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 'AND LEAST(p.price, IFNULL((SELECT price FROM ngpl_product_special ps WHERE ps.pr' at line 1<br />Error No: 1064<br />SELECT COUNT(DISTINCT p.product_id) AS total FROM ngpl_product_to_category p2c LEFT JOIN ngpl_product_filter pf ON (p2c.product_id = pf.product_id) LEFT JOIN ngpl_product p ON (pf.product_id = p.product_id) LEFT JOIN ngpl_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN ngpl_product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN ngpl_product_special ps ON p.product_id = ps.product_id LEFT JOIN ngpl_product_discount pds ON p.product_id = p2s.product_id WHERE pd.language_id = '1' AND p.status = '1' AND p.quantity > '0' AND p.stock_status_id != '5' AND p.date_available <= NOW() AND p2s.store_id = '0' AND p.product_id IN (2092) AND p2c.category_id = '61' AND pf.filter_id IN (80)AND LEAST(p.price, IFNULL((SELECT in /var/www/html/system/library/db/mysqli.php on line 40