Hello everyone I try to update to boolean in my table, so I had Error PDOException and I don't Why :
Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax
My line code sql is this :
public function updateSignal(Comments $comment)
{
$req = 'UPDATE Comments SET signal = TRUE WHERE idComments = :comment';
$result = $this->getBdd()->prepare($req);
$result->bindValue(':comment', $comment->getIdComments());
return $result->execute();
}
I don't find where is my error syntax, Please need help Thanks
$comment->getIdComments()the "s" on comments makes it sound like a plural so it could return an array. Also can you confirm that$this->getBdd()is using the PDO class and not a library?