[thelist] methods for creating a history table

RUST Randal RRust at COVANSYS.com
Fri Feb 7 11:03:00 CST 2003


I'm adding a history table to my db. It has the following columns:

historyID int(5) unsigned not null auto_increment primary key,
table char(20), #this is the table that was changed
recordID int(5), #id of the record that was changed
changeType char(20), #insert, update or delete
columnsAffected char(60), #??
changeDate date, #date the record was changed
changedBy char(30), #id of the person that made the change

I can pull all of the data that I need except for the "columnsAffected."
Is there an easy way to do this? What I'm thinking right now is that I
might need to match the old data with the new data and create an array
with the names of the columns that don't match. But I don't really want
to have to do that.

----------
Randal Rust
Covansys Corp.
Columbus, OH



More information about the thelist mailing list