OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: importing old database into new table structure
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Installation and Configuration
discountaromas
Hi

I recently did a re-install because my site had loads of problems, and it seemed to be an old version that was not compatible with many of the contributions.

Firstly I tried setting up using the old database, but there were errors in the admin section because there were missing tables in the old database. I then imported the new (sample) database and most of my problems went away. The trouble now is I've got a working site with the sample data in it, and I want to get my customers, affiliates etc into the working database. If I try importing the old database into the new one, it simply replaces all the data, and I end up with a non-working site with my customers and products. Is there a way that the old database can be merged into the new table structure? I'm not too bothered about the products because it is easy enough to use easypopulate to get the info back in... the hard part is getting everything else back!!

Any help will be greatly appreciated

Regards
Simon
Iggy
QUOTE (discountaromas @ Feb 8 2007, 03:06 PM) *
Hi

I recently did a re-install because my site had loads of problems, and it seemed to be an old version that was not compatible with many of the contributions.

Firstly I tried setting up using the old database, but there were errors in the admin section because there were missing tables in the old database. I then imported the new (sample) database and most of my problems went away. The trouble now is I've got a working site with the sample data in it, and I want to get my customers, affiliates etc into the working database. If I try importing the old database into the new one, it simply replaces all the data, and I end up with a non-working site with my customers and products. Is there a way that the old database can be merged into the new table structure? I'm not too bothered about the products because it is easy enough to use easypopulate to get the info back in... the hard part is getting everything else back!!

Any help will be greatly appreciated

Regards
Simon


Hi Simon,

The only sure-fire way I've found of taking two databases and merging them is to open them both up in phpMyAdmin and manually merge in the changes (unless you're a SQL guru in which case I'm sure you could do some kind of an automated merge. I've never had any luck with that though.)

Basically import the old and new databases to PMA, open them up in two browser windows (tabs come in handy for this) and rectify any changes between the two by either adding or subtracting fields on the old until it matches the new. Then export the table from the old and overwrite the new.

It's slow going meticulous work but results in success everytime.

HTH,
Iggy
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.