Ошибка в базе данных
DATABASE ERROR:
SELECT c.*, c.pubdate as fdate,
IFNULL(r.total_rating, 0) as points,
u.nickname as author, u.login as author_login
FROM cms_content c
LEFT JOIN cms_category cat ON cat.id = c.category_id
LEFT JOIN cms_users u ON u.id = c.user_id
LEFT JOIN cms_ratings_total r ON r.item_id=c.id AND r.target='content'
WHERE c.published = 1 AND c.canrate = 1 AND c.is_arhive = 0 AND c.pubdate <= '2013-11-27 01:41:53'
AND (c.is_end=0 OR (c.is_end=1 AND c.enddate >= '2013-11-27 01:41:53'))
AND (cat.NSLeft >= 1 AND cat.NSRight <= 18)
ORDER BY points DESC
LIMIT
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 12
Подскажите, в чем дело?