"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 A.news_date DESC LIMIT 0, 10' at line 6" :: SELECT SQL_CALC_FOUND_ROWS * , DATE_FORMAT(news_date, '%d.%m.%Y') AS news_date_format FROM dsne_news AS A LEFT JOIN dsne_news_names AS B ON B.news_id = A.news_id AND B.languages_id = 1 WHERE A.news_status = '0' AND A.news_calendar IN ('0', '2') AND news_group_id = ORDER BY A.news_date DESC LIMIT 0, 10