Lore System Error

There was an error querying the database.

Query: SELECT id,name,description,total_articles FROM lore_categories WHERE parent_category_id= '8' AND published = 1 ORDER BY

Error Message: (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 '' at line 1