Hi all, I want to create a "publish/undo system" for some tables but i don't know what is the best approach to do it. Imagine i have a table with columns id (auto-inc), data (text) then i want to edit table data (eg: create 2 new rows now, delete one tomorrow, update 3 rows tomorow too) and then decide if i want to preserve that modification or reverse it to the state it was before start that modifications.
How can i do this? I started with a auxiliar table with same columns, then, before edition i clean auxiliar data and copy from original: delete from _table; insert into _table select * from table; now, user can edit table (inserts, deletes, updates) and then, if we want to apply changes i copy back: delete from table; insert into table select * from _table; if we don't want to preserve, i don't need to do anything because on new edit, auxiliar table will be cleaned again. This works but it's not efficient at all (imagine table with 1.000.000 records). My question is, what is the best approach to do such thing? best regards and thanks for your time, Francisco A _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users