gdfhghjdfghgfhf Posted April 6, 2008 Share Posted April 6, 2008 i'm trying to UPDATE on multiple rows at once... i saw an example on the net but it gives me a sql error $query = "UPDATE news3 SET (valide,localisation,addresse,google) VALUES ('1','$localisation','$addresse','$google') WHERE id = '$band'"; all variables are $_POST values and i verified them all 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 '(valide,localisation,addresse,google) VALUES ('1','Bas-St-Laurent','33333','3333' at line 1 Quote Link to comment Share on other sites More sharing options...
onedumbcoder Posted April 6, 2008 Share Posted April 6, 2008 maybe try this? $query = "UPDATE news3 SET valide='1', localisation='$localisation', addresse='$addresse', google='$google' WHERE id = '$band'"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.