Hello to all reading this thread. I want to ask you a question about mysql records and more specifically deleting them. I have a database which has a table called orders. In orders I have fields: ID, Name, Date created, Date expire. My question is, how can an order be deleted at the "Date expire" ? I want the MySQL do it itself, so I would not be required to login and delete it mysqlf. Thanks for the time and hopefully I'll get it :) Good day all!

7 Years
Discussion Span
Last Post by pritaeas

You need to schedule that using Event Scheduler.

Create a procedure to delete the desired records and schedule the same.

please read more here and here.


debasisdas has posted good link
@Anuradha Mandal - atleast try to put some effort to read it ...

you can post problem, if you are getting any to write this scheduling or anything else (although this thread has not started by you)....

Votes + Comments
Do not understand?????

Although debasisdas has pointed you in the correct direction, if you are on a shared web host, chances are you cannot turn on the scheduler. In that case you may be able to use a cron job.

Votes + Comments
What are you saying?
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.