Posted 04 June 2006 - 10:30 PM
I was wondering what would be the most efficient way to archive a MySQL table. I have a table that has over 100 entries added to it per day, I need to archive them somewhere to be able to review them later.
Posted 05 June 2006 - 11:07 AM
Posted 05 June 2006 - 02:52 PM
You could maybe loop through the table each day and select entries that are more than 3 days old. Use a PHP script to grab the entries from the main table, insert them into the archive table then delete them on the main table.
is there a way to make an automatic process without having to run that script myself every day?
Posted 05 June 2006 - 04:56 PM
Posted 05 June 2006 - 04:58 PM
yes, you can setup a cron job which will then execute your php script every 24hours.
yeah that's what I thought but wasn't sure.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users