MDanz Posted June 2, 2010 Share Posted June 2, 2010 $updateblock = mysql_query("UPDATE Stacks SET number='$number', SET username='$username', SET reply='$reply', SET posted='$posted', SET keywords='$keywords', SET avatar='$avatar', SET Positive='$pos', SET Negative='$neg' WHERE origin=$origin+1") or die (mysql_error()); i get this error 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 'SET username='Guest', SET reply='another test', SET posted='2010-06-02 13:33:48'' at line 1 Quote Link to comment https://forums.phpfreaks.com/topic/203668-mysql-error-help/ Share on other sites More sharing options...
premiso Posted June 2, 2010 Share Posted June 2, 2010 You only use SET at the beginning: UPDATE stacks SET number='$number, username='$username' ....etc Quote Link to comment https://forums.phpfreaks.com/topic/203668-mysql-error-help/#findComment-1066893 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.