I've never done this before, but why do I keep getting and error when I try to create this event. I'm using HeidiSql to do this. Also, can LOOPS, WHILE, IF ELSE be used in events?
BEGIN
DECLARE x TIMESTAMP;
DECLARE y INT;
DECLARE a VARCHAR(50); // Here's where the error is.
SET x = current_timestamp();
insert into checked (stamp) values (x);
SELECT count(stamp) INTO y FROM checked;
IF y > 10 THEN// It also throws an error here.
a = 'PASS';
else
a = 'FAIL';
END IF;
insert into checked (timeCount) values (a);
END