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 published_at ASC limit 1' at line 1: SELECT blogs.id as id, blogs.title as title, blogs.permalink as permalink, blogs.updated_at as updated_at, blogs.published_at as published_at, blogs.views_count as views_count, blogs.comments_enabled as comments_enabled, blogs.preview_file as preview_file, blogs.banner_file as banner_file FROM blogs LEFT JOIN blogs_cross_categories ON blogs_cross_categories.blog_id = blogs.id WHERE ( published_at <= NOW() AND status > 1 AND blogs.site_id = '15' AND blogs_cross_categories.category_id IN ( ) ) ORDER BY published_at ASC limit 1 #0 active_records->get(blogs LEFT JOIN blogs_cross_categories ON blogs_cross_categories.blog_id = blogs.id) called at [/var/www/html/_core/API_model.php:1291] #1 API_Model->__f_getData() called at [/var/www/html/_core/API_model.php:462] #2 API_Model->__f_loadAndRun(Array ([id] => ,[outer_category_id] => )) called at [/var/www/html/_actions/pages_non_auth/tpl/components/blog/index.php:334] #3 blogAjax->render(1765862717_3808_) called at [/var/www/html/_core/API_routing.php:1608] #4 AJAX_component->drow() called at [/var/www/html/_actions/pages_non_auth/tpl/blog.php:3] #5 include_once(/var/www/html/_actions/pages_non_auth/tpl/blog.php) called at [/var/www/html/_core/API_routing.php:1931] #6 API_Controller->__loadView(tpl/blog, non_auth) called at [/var/www/html/_actions/pages_non_auth/index.php:176] #7 Controller->blog(Array ([site_lang] => ua,[permalink] => the-impact-of-downtime-on-small-businesses)) called at [/var/www/html/_core/API_routing.php:2209] #8 run() called at [/var/www/html/index.php:35]