phpMyAdmin tells me that the following code snippet is syntactically incorrect :
SET @time := NOW();
SET @timeset :=0;
IF @timeset=1
THEN SET @time := DATE_ADD(@time,INTERVAL 10 SECOND);
ELSE SET @time := DATE_SUB(NOW(),INTERVAL 1 DAY);
SET @timeset := 1;
END IF;
but I fail to see what's wrong with it.
The exact error message goes :
UPDATE : thanks to wolfgangalther's answer, I found the following workaround :
SET @time := NOW();
SET @timeset :=0;
SET @time=IF(@timeset=1,DATE_ADD(@time,INTERVAL 10 SECOND),DATE_SUB(NOW(),INTERVAL 1 DAY));
SET @timeset:=1;