Audit table

forsaken

New member
All,

I need to create an audit record for each update/insert/delete, and not sure how to approach this. Im using the latest Dadabik, fedora, mysql.

I'd like it to be as simple as "(user name) did X" but somehow I know it won't be that simple.

I've thought about using triggers, but not sure how to really do them to begin with (have a general idea) and not sure how to get the username from dadabik to put in there

Another idea I had was to just modify business_logic.php to duplicate the sql hardcoded to an audit table, but get quickly lost going through everything (not very strong with PHP)

So im hoping someone somewhere out there has had to do this. Help! :)

Thanks,
jeff
 

DebbieS

DaDaBIK Guru
Have you tried to insert the updated record into the audit table with the date of the change and a separate ID? You would essentially have a dup of the first table, but you could then look at and find all the changes for record 5 and it would display everything.

I wrote a copy function a while back ... search through the forum for all dates ... if you can't find it I'll look for it and post.
 
Top