How Can I write a PHP script or MySQL script to do a repetitive task after a period of time? One example of this could be to delete the top row of a specific table in the database every 120 seconds.
问问题
130 次
使用事件
CREATE EVENT delete_top_event
ON SCHEDULE
EVERY 2 MINUTE
DO
DELETE FROM your_table order by some_column desc limit 1;