Mysql event scheduler is like this :
CREATE EVENT update_status
ON SCHEDULE EVERY 2 MINUTE
DO
BEGIN
UPDATE customer_group
SET is_status = 0
WHERE CURRENT_TIMESTAMP BETWEEN start_date AND end_date;
UPDATE customer_group
SET is_status = 1
WHERE CURRENT_TIMESTAMP NOT BETWEEN start_date AND end_date;
END
When I run the script, there is exist error like this :
Error Code: 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 '' at line 7
Any solution to solve my problem?
Thank you very much