This post has already been read 1520 times!
Sample database cart table contains four columns cart_id, user_id, product_id and created_at.
Enable MySQL Event Scheduler
Start MySQL event scheduler by executing following query in PhpMyAdmin or MySQL command prompt.
Create a Event
Here the following event will run everyday and clear/delete 10 days old data from cart table based on time stamp
If you want to modify the event run time simple you can execute a query in below syntax.
Show all the running events.
You can drop the event for executing below query.
Check event schedule status under process tab in PhpMyAdmin root (it will show only when scheduled event is running).