simplyrichard Posted October 6, 2008 Share Posted October 6, 2008 I'm working on a application that requires me to make a archive of every row upon delete. What is the best was to handle these tranactions? Should I do it via php or is there something on mysql end that will handle this? Richard Link to comment https://forums.phpfreaks.com/topic/127225-archiving-data-how-should-one-handle-such-transactions-o/ Share on other sites More sharing options...
severndigital Posted October 6, 2008 Share Posted October 6, 2008 if they have to be removed from the table all together you could create a new table called deleted_rows and move them into that table upon deletion. then once a month or whatever export from mysql. if not, then add a field called active or something and give active items a value of 1, and "removed" items a value of 0. then when you do your query's look for only active = 1 just my 2 cents, you can give me change if you want Link to comment https://forums.phpfreaks.com/topic/127225-archiving-data-how-should-one-handle-such-transactions-o/#findComment-658071 Share on other sites More sharing options...
simplyrichard Posted October 7, 2008 Author Share Posted October 7, 2008 I want to keep my tables clean. I'm shocked that there is no way to collect all the information in a row and move it over to a new table. Blah. I know i can do it by many queries but I was hoping for a more efficence way of doing it. Link to comment https://forums.phpfreaks.com/topic/127225-archiving-data-how-should-one-handle-such-transactions-o/#findComment-659199 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.