Results 1 to 2 of 2
Jun 2, 2013, 22:34 #1
- Join Date
- Jul 2006
- New Zealand
- 0 Post(s)
- 0 Thread(s)
SQL Error WHERE AND Clause problem with PHP
Its been ages since i have asked for programming help i have not done much in ages and trying to get back in to it anyway im wanting to work on my current projects however i run into a problem however not working the way i want and the error is an old ugly error ive attempted to look on the internet to try and solve this looking at tutorial but nothing i can find.
error is 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)";
What does that mean does this Query point out anything obivious to you?
Query = "SELECT * FROM pms WHERE reciever='demo' AND read='0'";
Not sure what the problem is here but i cant find anything wrong with it seems fine unless ive made a stupid error?
Can anyone help me and help me refresh my memory?
Jun 2, 2013, 22:51 #2
READ is a reserved word: http://dev.mysql.com/doc/refman/5.6/...ved-words.html
Change the column name, or put it in backticks.Guido - Community Team Leader
The 2013 SitePoint Awards - Nominate your heroes now!
Thinking Web: Voices of the Community
Blog - Free Flash Slideshow Widget