Has anybody got any insight into an error I am experiencing. I am building a website in OpenCart 2.3.0.2 and whilst the website is working fine, I have recently found that when you have products over more than 1 category page, I can for example click on the navigation button at the bottom of a category (page 2, next page or last page buttons) and it works absolutely fine or but once on page 2, if I reverse the process (i.e. Page 1, Previous or First Page butttons), I get the following error.
Code: Select all
Fatal error: Uncaught Exception: Error: 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 '-15, 15' at line 1<br />Error No: 1064<br /> SELECT p.product_id, p.sort_order, "1" AS match_filters, pp.sort_order FROM `oc_product` AS p INNER JOIN `oc_product_to_store` AS p2s ON (p2s.product_id = p.product_id) INNER JOIN `oc_bf_filter` AS f ON (p.product_id = f.product_id) INNER JOIN `oc_product_to_category` AS p2c ON (p.product_id = p2c.product_id) INNER JOIN `oc_product_description` AS pd ON (pd.product_id = p.product_id) INNER JOIN `oc_product` AS pp ON (pp.product_id = p.product_id) WHERE p2s.store_id = '0' AND p.date_available <= NOW() AND p2c.category_id = '102' AND pd.language_id = '1' GROUP BY p.product_id HAVING match_filters = 1 ORDER BY pp.sort_order ASC, pd.name ASC LIMIT -15, 15 in /homepages/24/d163902889/htdocs/hutchings_direct/system/library/db/mysqli.php:40 Stack trace: #0 /homepages/24/d163902889/htdocs/hutchings_direct/system/l in /homepages/24/d163902889/htdocs/hutchings_direct/system/library/db/mysqli.php on line [b]40
I'm stumped, anybody experienced this problem and can suggest how I rectify it? Any help would be very much appreciated.