Okay, so my mysql query syntax is returning 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 'read='yes' WHERE id='1'' at line 1
Here is the query:
$update = mysql_query("UPDATE newnotifications SET read='$read' WHERE id='$id'");
The variables are in the error. I honestly have no idea what is wrong in the syntax. I have even copied & pasted from another one I have that works and just filled in other values for what to
update
, where
and set
.
Read is a reserved word,enclose it in backticks
http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedwords-5-5.html
SET `read`
0 comments:
Post a Comment