Query Error


MySQL Error  : Query Error
Query        : SELECT x.*, COUNT(z.com_id) as comments FROM book_data x LEFT JOIN book_com z ON (x.id=z.id) WHERE x.accepted='1' AND x.id = 22711 AND x.missionaryid =  GROUP BY x.id ORDER BY x.id DESC LIMIT 0, 1
Error Number : 1064 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 'GROUP BY x.id ORDER BY x.id DESC LIMIT 0, 1' at line 1
Requested URI: http://www.missionsite.net/scripts/lazarusgb/index.php?permalink=true&entry=22711
Date         : Thu, September 18, 2014 18:47:06
IP           : 54.82.211.237
Browser      : CCBot/2.0 (http://commoncrawl.org/faq/)
Referer      : http://www.google.com/url?sa=i&rct=j&q=kelton+barr&source=images&cd=&docid=ZRIbBW7NKX04pM&tbnid=N3kWiFr7Hm1kZM:&ved=0CAMQjxw&url=http%3A%2F%2Fwww.missionsite.net%2Felderkeltonbarr%2Fviewpicture%2F350669&ei=IYobVNfMC4-SyASgjYIw&psig=AFQjCNFkSWwHgp0GadOu-uep1g4AX1Pp5A&ust=1411177351900131
PHP Version  : 5.3.27
OS           : Linux
Server       : Apache/2.2.22
Server Name  : www.missionsite.net