Salut à tous,
J'ai une erreur sur un Update, et je dois plus avoir les yeux en face des trous, je n'arrive pas a voir d'où vient l'erreur.
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE doc_id = '5'' at line 6'
voici la requête :
Je vous remercie vivement d'avance pour votre aide.
Cdlt.
J'ai une erreur sur un Update, et je dois plus avoir les yeux en face des trous, je n'arrive pas a voir d'où vient l'erreur.
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE doc_id = '5'' at line 6'
voici la requête :
$req = $bd->prepare("UPDATE documents
SET doc_type = :doc_type,
doc_date = :doc_date,
doc_client = :doc_client,
doc_terrain = :doc_terrain,
WHERE doc_id = :id_doc_modif");
$req->bindValue('doc_id', $id_doc_modif, PDO: [langue]ARAM_INT);
$req->execute(array(
'doc_type' => $doc_type,
'doc_date' => $doc_date,
'doc_client' => $id_client,
'doc_terrain' => $id_terrain,
'id_doc_modif' => $id_doc_modif,
));
Je vous remercie vivement d'avance pour votre aide.
Cdlt.