Lore System Error

There was an error querying the database.

Query: SELECT lore_articles.id,lore_articles.title,lore_articles.created_time,lore_articles.num_views,lore_articles.num_ratings,total_rating/num_ratings AS rating, lore_articles.featured, LEFT(content, 0) AS preview, lore_categories.name AS category_name, lore_users.username AS username FROM lore_articles,lore_categories,lore_users WHERE lore_articles.category_id = '1' AND lore_articles.category_id = lore_categories.id AND lore_articles.user_id = lore_users.id AND lore_articles.published = 1 AND lore_categories.published = 1 ORDER BY lore_articles.

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