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 '-20, 20' at line 41

SELECT p.*, pd.*, colors.color, colors.saturation, IF(s.status, s.specials_new_products_price, NULL) AS specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) AS final_price, p2c.`categories_id`, `shops_has_products`.`shop_id` as shop_id, `shops_has_products`.`id` as shop_product_id, `shops_has_products`.`design_id` as shop_design_id, `shops_has_products`.`commission` as shop_commission, IF(`shops_has_products`.`id`,`shops_has_products_details`.`name`,`pd`.`products_name`) as products_name, IF(`shops_has_products`.`id`,`shops_has_products_details`.`description`,`pd`.`products_description`) as products_description, `m`.`manufacturers_name`, `shops_products_categories_has_products`.`categories_id` as `shop_category_id` FROM products_description AS pd, products AS p LEFT JOIN manufacturers AS m ON p.manufacturers_id = m.manufacturers_id LEFT JOIN specials AS s ON p.products_id = s.products_id LEFT JOIN products_builder_colors AS colors ON colors.prodId = p.products_id AND colors.default = 1 LEFT JOIN products_to_categories p2c ON p2c.products_id=p.products_id LEFT JOIN `shops_has_products` ON `shops_has_products`.`product_id` = `p`.`products_id` AND `shops_has_products`.`shop_id` = 0 LEFT JOIN `shops_products_categories_has_products` ON `shops_products_categories_has_products`.`product_id` = `shops_has_products`.`id` LEFT JOIN `shops_has_products_details` ON `shops_has_products_details`.`shops_has_products_id` = `shops_has_products`.`id` WHERE pd.products_id = p.products_id AND pd.language_id = 1 AND `p2c`.`categories_id` IN ('1','54','52','51','53','56','57','55') AND `p`.`products_status` = '1' AND (`p`.`products_date_available` <= '2017-12-18 03:57:19' OR `p`.`products_date_available` is NULL ) GROUP BY `p`.`products_id` ORDER BY `p`.`products_ordered` ASC, `p`.`products_id` ASC LIMIT -20, 20

[TEP STOP]


Backtrace data: database.php tep_db_error L:55 contentProducts.php tep_db_query L:75 categories.php contentProducts->getProducts L:216 .php categories::generate L: inner.php call_user_func_array L:57