beansandsausages Posted January 18, 2008 Share Posted January 18, 2008 hey all. can any 1 see any error's i think i am doing this right : $sql = "SELECT * FROM `post_box` WHERE read=N AND name=chris "; i get the error Could not successfully run You have an error in your SQL syntax near 'read=N AND name=chris) ' at line 1 Quote Link to comment https://forums.phpfreaks.com/topic/86622-solved-having-a-bad-day/ Share on other sites More sharing options...
rajivgonsalves Posted January 18, 2008 Share Posted January 18, 2008 I think read is a reserved keyword not too sure. also your forgetting your quotes this $sql = "SELECT * FROM `post_box` WHERE read=N AND name=chris "; should be $sql = "SELECT * FROM `post_box` WHERE `read`='N' AND `name`='chris' "; Quote Link to comment https://forums.phpfreaks.com/topic/86622-solved-having-a-bad-day/#findComment-442652 Share on other sites More sharing options...
fenway Posted January 18, 2008 Share Posted January 18, 2008 More importantly, you're not quoting your string literals. Quote Link to comment https://forums.phpfreaks.com/topic/86622-solved-having-a-bad-day/#findComment-442793 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.