My query code is:
$query = mysql_query("UPDATE books SET read = 'y' WHERE id = 2") or die(mysql_error());
and the error is:
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 = 'y' WHERE id = 2' at line 1
readis a reserved keyword in MySQL. Enclose it in backticks:See http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html for a list of reserved keywords.