SELECT * FROM faq WHERE faq.A !=0 AND faq.LOCKED IS NULL GROUP BY CAT ASC,ORD ASC, IDYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC,ORD ASC, ID' at line 1