From: Ben Clewett Date: April 18 2008 9:59am Subject: Re: History of changed rows List-Archive: http://lists.mysql.com/mysql/212360 Message-Id: <480870F2.5060501@clewett.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 >