Fatal error: Uncaught exception 'Exception' with message '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 ') GROUP BY op.product_id ORDER BY total DESC ' at line 12<br />Error No: 1064<br /> SELECT COUNT(total) as total FROM ( SELECT COUNT(DISTINCT op.product_id) AS total FROM 2018oc_order_product op LEFT JOIN `2018oc_order` o ON (op.order_id = o.order_id) LEFT JOIN `2018oc_product` p ON (op.product_id = p.product_id) LEFT JOIN 2018oc_product_to_store p2s ON (p.product_id = p2s.product_id) WHERE o.order_status_id > '0' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND (p.date_added >= NOW() - INTERVAL MONTH AND p.date_added <= NOW()) GROUP BY op.pr in /home/bluesky/elpaza.ru/docs/system/library/db/mysqli.php on line 40