MySql事件无法正常工作

时间:2015-08-26 06:05:53

标签: mysql

我为事件计划编写了以下脚本。这是我第一次按计划进行。我没有收到任何错误,但它没有执行所需的操作。

var fileCount = Request.Files.Count;
if (fileCount > 0)
{
 for (int i = 0; i < (fileCount); i++)
    { 
        HttpPostedFileBase Yourfile= Request.Files[i] as   HttpPostedFileBase;
        // do whatever with your file
    }
}

显示此消息 CREATE EVENT checkBlack ON SCHEDULE EVERY 5 SECOND DO DELETE FROM BlackList WHERE id=13;

但我有一行id为13。

帮助!!

1 个答案:

答案 0 :(得分:0)

DELIMITER $$


CREATE  /*[DEFINER = { user | CURRENT_USER }]*/ EVENT `checkBlack`

ON SCHEDULE EVERY 5 SECOND
DO
BEGIN
    DELETE FROM `BlackList` WHERE id=13;
END$$

DELIMITER ;