-5

I have a problem in Automatically delete row after 10 ninutes after creation - Databases using php

1 Answers1

0

Assuming the table has a creation_time column, the following query will delete the old rows:

DELETE FROM table_name WHERE creation_time < DATE_SUB(NOW(), INTERVAL 10 MINUTE);

You can run this periodically using the MySQL Event Scheduler.

Barmar
  • 741,623
  • 53
  • 500
  • 612