IF I select 1 order per row I am getting error ,how to fix ? version of zencart is 1.5.7c
PHP Fatal error: 1064: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 'ASC
ORDER BY max_num_of_products DESC
LIMIT 1' at line 4 :: SELECT COUNT( * ) AS max_num_of_products
FROM (orders o LEFT JOIN orders_products op ON o.orders_id = op.orders_id), orders_total ot
WHERE o.orders_id = ot.orders_id
AND ot.class = 'ot_shipping' AND date_purchased BETWEEN '2024-07-01 00:00' AND '2024-08-28 23:59' GROUP BY o.orders_id ASC
ORDER BY max_num_of_products DESC
LIMIT 1
Bookmarks