I have this error when i try to update my value with special character
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 't' WHERE (idcommentaire = 117)' at line 1. Failing Query: "UPDATE commentaire SET commentaire = 'test't' WHERE (idcommentaire = 117)"
UPDATE commentaire SET commentaire = 'test't' WHERE (idcommentaire = 117)
^
Why doctrine does not manage special characters ?
My function:
static public function modifierCommentaire($id, $commentaire)
{
$req = Doctrine_Query::create()
->update('Commentaire c')
->set('c.commentaire ', $commentaire)
->where("c.idcommentaire=$id")
->execute();
}