Audit Trail Record store for certain time/year

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
nadimsia
User
Posts: 31

Audit Trail Record store for certain time/year

Post by nadimsia »

How to setup in phpmaker about data in Audit Trail. I want the data store for only 3 year. The old record that already 3 year will autodelete. Its mean only store new record.


kirondedshem
User
Posts: 642

Post by kirondedshem »

you will have to handle the delete yoursef, for example, you will need to
1.craete custom file and inside it, call the neccessary sql to delete logs older than 3 years.(read help on custom files), you might want to put no header/ footer

  1. create a cron job or scheduled task which calls the file after a given period of time, like 2 times a day etc.(google some examples)
    so this means everytime the files is run it will try to delete all logs which are older than 3 years.

sangnandar
User
Posts: 980

Post by sangnandar »

If you have full access to database server, there is Event Scheduler you can use. Set the event type to be "recurring" and write your sql delete condition.


Post Reply