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 'FROM oc_product_to_category p2c LEFT JOIN oc_product p ON (p2c.product_id = p...' at line 1<br />Error No: 1064<br />SELECT p.product_id, AVG(CASE WHEN r.status = '1' THEN r.rating END) AS rating, (SELECT MIN(pd2.price) FROM oc_product_discount pd2 WHERE pd2.product_id = p.product_id AND pd2.customer_group_id = '1' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())) LIMIT 1) AS discount, (SELECT MIN(ps.price) FROM oc_product_special ps WHERE ps.product_id = p.product_id 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())) LIMIT 1) AS special FROM oc_product p LEFT JOIN oc_review r ON (p.product_id = r.product_id) GROUP BY p.product_id FROM oc_product_to_category in /home/web/arsenal-prime.ru/www/system/library/db/mysqli.php on line 41