sql error 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 'ORDER BY emofaces.emoname, emofaces.caption' at line 5
in /home/marijn/emofaces.com/inc/emofaces.functions.php on line 164
function of class
sql code:
SELECT emofacesdetails.id, emofaces.*, emofacesdetails.width, emofacesdetails.height, emofacesdetails.count, emofacesdetails.nrvotes, emofacesdetails.score, emofacesdetails.emotype, emofacesdetails.zazzleid FROM emofacesdetails INNER JOIN category_items ON (category_items.itemid = emofacesdetails.id) LEFT JOIN emofaces ON (emofacesdetails.id = emofaces.id) WHERE emofacesdetails.emotype = 2 AND category_items.categoryid = ORDER BY emofaces.emoname, emofaces.caption