I have a table:
CREATE TABLE test_time (`id` int(11) not null, `num` int(11) not null, PRIMARYKEY(`id`);
After that, I create an event:
CREATE
EVENT testEvent
ON
SCHEDULE EVERY 1 SECOND
DO
BEGIN
UPDATE
test_time
SET
num = num + 1
WHERE
id = 1;
UPDATE
test_time
SET
num = num + 1
WHERE
id = 2;
END
and MySQL said: (note: line 12 is id = 1; )
#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 12
Why is error and how can I fix it?