mardi 4 août 2015

MySQL UPDATE query syntax error

I have this simple code and for some reason it doesn't work.

$query_2 = mysql_query("UPDATE movimenti
                        SET
                        movimenti.id_dentista = $hidden_id_dottore,
                        movimenti.id_trattamento = $hidden_id_tratt,
                        movimenti.id_cliente = $hidden_id_paz,
                        movimenti.movimenti = $movimento
                        WHERE movimenti.id = $id")
                        or die(mysql_error());

this is the error about the query:

"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 movimenti.id = '79'' at line 7"

Aucun commentaire:

Enregistrer un commentaire