编辑:我发现我的 MySQL 版本不支持它。我运行 5.0.91,它需要 5.1 左右。我假设语法是正确的。谢谢您的帮助。
我刚刚创建了这个应该每小时运行的 mysql 事件。但是,我不断收到此错误:
#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 'EVENT event_upcomingbattle ON SCHEDULE EVERY 1 HOUR STARTS CURRENT_TIMESTAMP' at line 1
这是我的代码:
DELIMITER //
CREATE EVENT event_upcomingbattle
ON SCHEDULE EVERY 1 HOUR
STARTS CURRENT_TIMESTAMP
DO
CALL update_upcomingbattle();
END//
DELIMITER ;
我错过了什么愚蠢的东西吗?update_upcomingbattle()
程序存在。