Storing changes to table data
Posted: Sat Oct 20, 2007 9:40 am
Hi all,
I am working on a project where users will create and change database information. I want to keep a historical record/audit trail/change information about each record. A record contains several editable fields. One approach I'm thinking of is storing a complete copy of a row (within my PHP code) before calling an UPDATE on it. Then, some type of diff function could be used to show what changed upon each update.
I have been told of the possible use of triggers, but am only using MySQL 4.1.21.
Do you know of a script of PHP class which has been already written for such a functionality?
Thanks.
Eoin
I am working on a project where users will create and change database information. I want to keep a historical record/audit trail/change information about each record. A record contains several editable fields. One approach I'm thinking of is storing a complete copy of a row (within my PHP code) before calling an UPDATE on it. Then, some type of diff function could be used to show what changed upon each update.
I have been told of the possible use of triggers, but am only using MySQL 4.1.21.
Do you know of a script of PHP class which has been already written for such a functionality?
Thanks.
Eoin