SQLSTATE[42000]: Syntax error or access violation: 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 '-9, 20' at line 15 SELECT contents.visit AS contents_visit, contents.parent_id AS contents_parent_id, contents.parent_ids AS contents_parent_ids, contents.module AS contents_module, contents.template_id AS contents_template_id, contents.photo_id AS contents_photo_id, contents.file_id AS contents_file_id, contents.sm_image_id AS contents_sm_image_id, contents.date AS contents_date, contents.time AS contents_time, contents.date_to AS contents_date_to, contents.custom_data AS contents_custom_data, contents.end_date AS contents_end_date, contents.created_at AS contents_created_at, contents.updated_at AS contents_updated_at, contents.id AS contents_id, contents.name AS contents_name, contents.order AS contents_order, contents.active AS contents_active, contents.site_id AS contents_site_id, contents_translations.content_short AS contents_translations_content_short, contents_translations.content_full AS contents_translations_content_full, contents_translations.photo_id AS contents_translations_photo_id, contents_translations.photo_ids AS contents_translations_photo_ids, contents_translations.file_id AS contents_translations_file_id, contents_translations.file_ids AS contents_translations_file_ids, contents_translations.custom_data AS contents_translations_custom_data, contents_translations.twitter_post_id AS contents_translations_twitter_post_id, contents_translations.facebook_post_id AS contents_translations_facebook_post_id, contents_translations.id AS contents_translations_id, contents_translations.record_id AS contents_translations_record_id, contents_translations.language_id AS contents_translations_language_id, contents_translations.permalink_id AS contents_translations_permalink_id, contents_translations.seo_id AS contents_translations_seo_id, contents_translations.active AS contents_translations_active, contents_translations.name AS contents_translations_name FROM contents JOIN contents_translations AS contents_translations ON contents_translations.language_id = 1 AND contents_translations.record_id = contents.id WHERE contents.active = 1 AND contents.site_id = 1 AND contents_translations.active = 1 AND (contents.end_date is NULL OR contents.end_date >= "2025-09-04" OR contents.end_date = "0000-00-00") AND (contents.date is NULL OR concat(date, " ", if(time, time, "00:00:00")) <= "2025-09-04 15:25:00" OR contents.date = "0000-00-00") AND contents.module = "Entries" AND (FIND_IN_SET("3", contents.parent_ids)) AND (ExtractValue(contents.custom_data, '/object/value[@key="article_type"]') = "promotedCheckbox" AND (ExtractValue(contents.custom_data, '/object/value[@key="sponsored_date_end"]') < "2025-09-04" OR ExtractValue(contents.custom_data, '/object/value[@key="sponsored_date_start"]') > "2025-09-04") OR ExtractValue(contents.custom_data, '/object/value[@key="article_type"]') != "promotedCheckbox") AND (ExtractValue(contents.custom_data, '/object/value[@key="article_type"]') = "payedCheckbox" AND (ExtractValue(contents.custom_data, '/object/value[@key="sponsored_date_end"]') < "2025-09-04" OR ExtractValue(contents.custom_data, '/object/value[@key="sponsored_date_start"]') > "2025-09-04") OR ExtractValue(contents.custom_data, '/object/value[@key="article_type"]') != "payedCheckbox") ORDER BY IF( contents.updated_at IS NOT NULL, contents.updated_at, CONCAT(contents.date, ' ', contents.time) ) DESC, contents_order ASC, contents_id DESC LIMIT -9, 20 #0 /var/www_php8/application/telko/models/ContentsModel.php(207): cybercode\query_builder\mysql\Select->execute() #1 /var/www_php8/application/telko/controllers/CategoriesController.php(77): application\telko\models\ContentsModel->getByParentIds() #2 [internal function]: application\telko\controllers\CategoriesController->details() #3 /var/www_php8/cybercode/Controller.php(59): call_user_func_array() #4 /var/www_php8/cybercode/Application.php(176): cybercode\Controller->executeActionByName() #5 /var/www_php8/cybercode/Application.php(157): cybercode\Application::callController() #6 /var/www_php8/public_html/__telko.in/index.php(53): cybercode\Application::run() #7 {main}