Jump to content

[SOLVED] php mysql query - how do I set to clauses on WHERE function?


daveh33

Recommended Posts

thanks but I get 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 'to='all' Order by time' at line 1

 

the code is

 

$query = mysql_query("SELECT * from messages WHERE roomid='$rid' && to='all' Order by time") or die (mysql_error());

Ah ok thats new to me - but I still get the 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 'to='all' ORDER BY `time`' at line 1

 

there is 7 records in the mysql where the to field is all - I don't understand why it wont work

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.