Re: QuickForm: anyone have any examples of audit code that logs every edit / change to data?

From: Date: Sat, 15 Jan 2005 08:56:37 +0000
Subject: Re: QuickForm: anyone have any examples of audit code that logs every edit / change to data?
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16941@lists.php.net to get a copy of this message
Hi, Justin Patrin wrote:
You are most certainly storing your data in the database. In that case you should define triggers that will fire after update on the tables in question and will write to some audit table. The actual trigger code is of course DB specific.
And then there's DB_DataObject which gives you the same kind of functionality, only in PHP, making it DB independant. As I said before, overriding the update() method on a DataObject is a great way to do this.
Yes of course, but this will work if you *only* access your data through DB_DO, while the trigger solution will work for any updates to the DB, even done by any console / GUI tools.

« previous php.pear.general (#16941) next »