Jump to content

MySql Syntax Error! <<-- WHERE??


glenelkins

Recommended Posts

Can anyone spot where this error is coming from?

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='1' WHERE id='1'' at line 1

[code]
<?
$id = $_GET['id'];

$result = $this->DbQuery ("SELECT subject,message,from_id FROM messages WHERE id='$id'") or die (mysql_error());
$this->DbQuery("UPDATE messages SET read='1' WHERE id='$id'") or die (mysql_error());
list ($subject,$message,$from_id) = mysql_fetch_array($result);
?>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/27104-mysql-syntax-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.