Okay, so let's say I want to delete all tickets that were last updated BEFORE 01-01-2020 (along with their attachments).
attachments
- select
tocket_id
from ost_ticket
where lastupdate
< '2020-01-01'
- php manage.php file expunge -T $ticket_id
Will something like this delete all the attachments for the respective tickets?
Also, let's say I want to delete ticket_id 123456 via CLI.
What is the best approach to writing a script to delete all relevant records from all tables for ticket_id = 123456
Thanks