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!
arwenvd
0
Newbie Poster
Recommended Answers
Jump to PostYou need to schedule that using Event Scheduler.
Create a procedure to delete the desired records and schedule the same.
please read more here and
Jump to PostAlthough 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.
All 6 Replies
debasisdas
580
Posting Genius
Featured Poster
Anuradha Mandal
-28
Junior Poster
debasisdas
commented:
don't post mindless stuff
-3
pratik_garg
-5
Light Poster
Anuradha Mandal
commented:
Do not understand?????
+0
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
debasisdas
commented:
agree
+13
Anuradha Mandal
commented:
What are you saying?
+0
Anuradha Mandal
-28
Junior Poster
debasisdas
commented:
out is the way to go.
-3
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.