I have a sql request and in firebug I have an error.
This is my sql request :
$sql = "UPDATE public.".$tableBDD." SET ".$champsDB." WHERE ".$idTable."='".$idUpdate."'";
And before that, I have this :
$champsDB.= $champs->nom.'=\''.addslashes($ligne[$i]).'\',';
So it should work because I add slashes in my string. But my error is :
Warning: pg_query(): Query failed: ERROR: syntaxe error on « hiver » LINE 1: ...M_ASK',annee_ref_c_amg='1958',nom_culture='Blé d\'hiver',dat...
And it shows the error on "d'\hiver" So I donc understand why because I shouldn't have an error with the quotes anymore.
Can someone help me please ?