I'm working on a custom tag to somewhat automate the auditing of database
changes for an application and I have a "dumb" question -

In the "start" section of the tag I am storing the current values into a
structure, then my idea is to requery the table at the end section and
compare the two to create the audit records to be created.

However, do I need to do anything special to make sure that the structure is
maintained between the start and end tags?

For example,

<cf_audit action="" table="users" RecordID="3">
   <cfquery name="qThisAction" datasource="#DSN#">
UPDATE Users SET
Name='This',
Username = 'Testing'
Address = 'Whatever'
....
WHERE users_id = 3
   </cfquery>
</cf_audit>

This would be a lot easier to take care of if I was on a SQL Server
environment, triggers would be perfect for this.  However this is running on
a MySQL datasource, hence the lack of SP's and triggers.  I've got the start
section creating the structure that has the original values of the record.
I'm just hoping that I'm doing the structure correctly.

Ideas?
Thanks!
Hatton

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.680 / Virus Database: 442 - Release Date: 5/9/2004
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to