No problem.
I do this using three triggers on Insert, Update and Delete. Then
update a log file who's schema starts:
CREATE TABLE ?_log (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
transact ENUM ('I','U','D') NOT NULL,
key_from_table ??? NOT NULL,
KEY (key_from_table),
field_1 ?? ,
field_2 ??,
...
field_n ??
I don't know a way of copying over every field accept long-hand in the
triggers.
Hope this is useful...
Ben
C K wrote:
> Hi all.
> How can we manage the history of changed rows in the database. I have some
> idea but not yet implemented. By using triggers to make a copy of the row
> being changed to the another table in the same db. Is there any way to only
> save the changed fields data and field name? Any other idea?
> Thanks
> CPK
>