Guest 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 Link to comment https://forums.phpfreaks.com/topic/99787-help-me-debug-my-sql-query/ 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'"; Link to comment https://forums.phpfreaks.com/topic/99787-help-me-debug-my-sql-query/#findComment-510337 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.