1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| function updateOne() {
$sql = "
UPDATE
administration.client
SET
nom_client = :nom_client,
adresse = :adresse,
contact_tel = :contact_tel,
contact_mail = :contact_mail,
vignette = :vignette,
applications = ARRAY[:applications]::smallint[],
maj_client = now()
WHERE
id_client = :id_client
";
var_dump($sql);
$query = $this->conn->prepare($sql);
$query->bindParam(':id_client', $this->id_client, PDO::PARAM_INT);
$query->bindParam(':nom_client', $this->nom_client, PDO::PARAM_STR);
$query->bindParam(':adresse', $this->adresse, PDO::PARAM_STR);
$query->bindParam(':contact_tel', $this->contact_tel, PDO::PARAM_STR);
$query->bindParam(':contact_mail', $this->contact_mail, PDO::PARAM_STR);
$query->bindParam(':vignette', $this->vignette, PDO::PARAM_STR);
$query->bindParam(':applications', $this->application); |
Partager