Skip to main content

Deleteing record from MySQL Database after 1 Week


Run this code at regular intervals, for example once per day:

Code:

DELETE FROM moviesdone WHERE datetimecol < NOW() - INTERVAL 7 DAY

Comments