clown[NOR] Posted May 15, 2007 Share Posted May 15, 2007 I just can't seem to find what's wrong here... can anyone see what i've done wrong? $query = "SELECT * FROM `news_messages` WHERE to ='".$to."'"; 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 ='[email protected]'' at line 1 Thanks In Advance - Clown Link to comment https://forums.phpfreaks.com/topic/51488-solved-sql-error-should-be-an-easy-fix/ Share on other sites More sharing options...
MadTechie Posted May 15, 2007 Share Posted May 15, 2007 try $query = "SELECT * FROM `news_messages` WHERE `to` ='$to'"; Link to comment https://forums.phpfreaks.com/topic/51488-solved-sql-error-should-be-an-easy-fix/#findComment-253557 Share on other sites More sharing options...
clown[NOR] Posted May 15, 2007 Author Share Posted May 15, 2007 thanks... as I said... easy fix Link to comment https://forums.phpfreaks.com/topic/51488-solved-sql-error-should-be-an-easy-fix/#findComment-253559 Share on other sites More sharing options...
MadTechie Posted May 15, 2007 Share Posted May 15, 2007 in under a minute Link to comment https://forums.phpfreaks.com/topic/51488-solved-sql-error-should-be-an-easy-fix/#findComment-253561 Share on other sites More sharing options...
clown[NOR] Posted May 15, 2007 Author Share Posted May 15, 2007 not bad haha Link to comment https://forums.phpfreaks.com/topic/51488-solved-sql-error-should-be-an-easy-fix/#findComment-253568 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.