Jump to content

Syntax error


adamjones

Recommended Posts

Hi, I'm getting 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='0'' at line 1

With this code;

$msg  = mysql_query("SELECT * FROM `messages` WHERE toid='$id' AND read='0'") or  die(mysql_error());
$messages = mysql_num_rows($msg);

It works fine if I remove "read='0'"... :-(

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/287280-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.