UPHPU, Here is a database conundrum. I have two databases with identical tables (same structure different data). They have been on different sites though collecting data from different groups of people. I now need to merge that data. There is one table that relies on the 'id' key of another table. So the id's well need to be changed, and the other table updated to match. Any ideas?
I think I like this way the best: http://www.everymanhosting.com/forum/about22.html However, this will not address the required cascading update. This has some good information: http://blog.mclaughlinsoftware.com/2009/05/25/mysql-merge-gone-awry/ But also not a final solution. I am thinking I may just write a PHP script that will select from db1.table1, insert it into db2.table1 and then check if there is an associated row in db1.table2 and if so insert that in db2.table 2 with new 'id' key from last insert on db2.table1. Thoughts? Thanks, Jonathan (aka SunSparc) _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
