TCH-JimE Posted September 24, 2004 Posted September 24, 2004 Hello, I need to do the following every day, basically i need it to backupmy phpBB database, but then to copy the data into another (on the same website/cpanel) database, but not overwrite any existing data, just update the data. Make sense? (E.g. say i have post 1, 2, 3, 4, 5 on the existing database, i back this up, and then transfer it to the other database which only has post 1 and 2 in, it basically doesnt overwrite this, but fills in the rest!) Any ideas anybody? Thanks Jimuni *waves to all TCH staff* Quote
borfast Posted September 24, 2004 Posted September 24, 2004 Hey Jim, how are you? I don't have much time but here's a thought: Create a PHP script to be called by a cron job. The PHP code in it would perform the following tasks: 1 - get the last post ID from the backup database. 2 - get all posts from the main database with an SQL query using "WHERE pid>$last_post_id". 3 - insert those posts into the backup database. I can elaborate on that later, if you want. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.