Je sèche sur ma requête préparée.
Code : Tout sélectionner
$req = $bdd->exec('UPDATE redaction SET titre = :titre, titreCourt = :titreCourt WHERE id = :id');
$req->execute(array(
'titre' => $_POST['titre'],
'titreCourt' => $_POST['titreCourt'],
'id' => $_GET['edit']
));
PDO::exec(): 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 ':titre, titreCourt = :titreCourt WHERE id = :id' at line 1 in
Fatal error: Call to a member function execute() on a non-object in
Merci pour votre aide.