This topic is locked

historical records for audit trail

4/19/2007 5:57:41 PM
PHPRunner General questions
A
allen@honeycombcreative.co author

I have a client that want's to keep a full historical record of all changes done to a record for audit purposes. Basically, everytime a change/update is made to a record, the previous data is stored as viewable only.
Can anyone point me in the right direction.
Thanks.

A.

Sergey Kornilov admin 4/19/2007

Use BeforeEdit event. Check "Send email with old data" sample action that shows how to access database record before it's updated.

Modify this event to old record in another table.
You can use INSERT INTO ... SELECT FROM SQL query for this purpose.

See http://www.webcheatsheet.com/sql/interacti.../sql_insert.php (Example 2)