Code: Select all
Notice: 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 'DATE(cr.date_added) >= '2012-11-01'DATE(cr.date_added) <= '2013-01-21' GROUP BY ' at line 1
Error No: 1064
SELECT cr.customer_id, CONCAT(c.firstname, ' ', c.lastname) AS customer, c.email, cgd.name AS customer_group, c.status, SUM(cr.points) AS points, COUNT(o.order_id) AS orders, SUM(o.total) AS total FROM customer_reward cr LEFT JOIN `customer` c ON (cr.customer_id = c.customer_id) LEFT JOIN customer_group_description cgd ON (c.customer_group_id = cgd.customer_group_id) LEFT JOIN `order` o ON (cr.order_id = o.order_id) WHERE cgd.language_id = '1'DATE(cr.date_added) >= '2012-11-01'DATE(cr.date_added) <= '2013-01-21' GROUP BY cr.customer_id ORDER BY points DESC LIMIT 0,200 in /home/public_html/system/database/mysql.php on line 49