I have a SQL error below when I run my PHP SQL code:
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 useid = 8' at line 1
mysql_query("UPDATE free_ebook SET math = $assign_math WHERE useid = $newuserid;")or die(mysql_error());
The math
field is int(10)
, and useid
is also int(10)
.