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 ='ole.aass@oleaa.net'' at line 1 Thanks In Advance - Clown Quote 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'"; Quote 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 Quote 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 Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.