These are the statements
INSERT INTO toolate (name,type,date)
SELECT name, type ,date
FROM homework
WHERE date < CURRENT_DATE()
and
DELETE FROM homework WHERE date < CURRENT_DATE()
I need to combine these two so that my event will work in a proper order. Firstly the INSERT statement then the DELETE one.
That way I can still see homework that's past date while having a clean homework table and it needs to happen automatically thus why I'm using events. Of course I will welcome a different solution.
date < CURRENT_DATE(). He's right. The only reason to move rows from one table to another is when you have many millions of stale rows of data to put into archives.