Fatal error: Uncaught Exception: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'te_available <= NOW() AND p2s.store_id = '0' AND ps.customer_group_id = '1' A...' at line 3<br />Error No: 1064<br />SELECT DISTINCT ps.product_id, (SELECT AVG(rating) FROM ocie_review r1 WHERE r1.product_id = ps.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating FROM ocie_product_special ps LEFT JOIN ocie_product p ON (ps.product_id = p.product_id) LEFT JOIN ocie_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN ocie_product_to_store p2s ON (p.product_id = p2s.product_id) WHERE p.status = '1' AND p.quantity > '0' AND p.da te_available <= NOW() AND p2s.store_id = '0' AND ps.customer_group_id = '1' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) GROUP BY ps.product_id ORDER BY p.sort_order ASC, LCASE(p.date_added) DESC LIMIT 0,50 in /home/motobg in /home/motobgg/ocartdata/storage/modification/system/library/db/mysqli.php on line 51