Im new to MySql events and I never used them before so please to bear with me.
With My DB I have order_details and invoices tables which I need to create an Event to delete all the records older than 2 months and where order_details status = 5
and invoices status = 3
and I want the event to make the deleting every day at 3AM How I may accomplish this
Any help will be much appreciated
Update :
Both tables have timestamp column named created_at
Tables Definition
A - order_dateils :
- id
- order_bar
- description
- status
- created_at
B - invoices :
- id
- invoice_id
- status
- created_at
I hope this may answer your question. Make sure to include your schema (database name) with your table name such as [schema_name.table_name] to make sure the event is associated with the right tables. Good luck.