Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Transferring customer data from one database to another


RelentlessSkateshop

Recommended Posts

I have built a new store and I want to transfer the 25 existing customer accounts saved in one database to another. I want the customers to be able to log in to my new store just as they did in the old store, as if nothing changed for them. I know how to create .SQL files and I know how to edit tables in phpMyAdmin, and I'm not afraid to look up definitions on the net to find the meanings of instructions from people who know what they're doing. Does anyone know how to automatically transfer the customer information from one database to another?

 

The new database has more tables than the old database because the new store has more features, so I can't just run the .sql script from my old database in my new database, right?

 

Thank you,

Jeffro

If you say you can't do it, you're only fooling yourself.

Link to comment
Share on other sites

I have copies of both databases on my local machine. If I start off with the new database with only one customer entry and then run the .sql file in phpMyAdmin from the old store, as soon as the database encounters a table with data that already exists I get an error and it won't try to fill the rest of the tables. Another way I could do this is if I wiped out the tables containing customer data, which should be address_book, customers, and customer_info, and then ran the .sql from the old store, then somehow uploaded the customer data from the newer .sql file (which has only one customer). But I don't know how to make sure the database will automatically increment the customer numbers that sign up at the store in the future. Can anyone please help me?

If you say you can't do it, you're only fooling yourself.

Link to comment
Share on other sites

I have copies of both databases on my local machine. If I start off with the new database with only one customer entry and then run the .sql file in phpMyAdmin from the old store, as soon as the database encounters a table with data that already exists I get an error and it won't try to fill the rest of the tables. Another way I could do this is if I wiped out the tables containing customer data, which should be address_book, customers, and customer_info, and then ran the .sql from the old store, then somehow uploaded the customer data from the newer .sql file (which has only one customer). But I don't know how to make sure the database will automatically increment the customer numbers that sign up at the store in the future. Can anyone please help me?

 

 

why don't you simply copy the entire database - not just the customers tables ?

also then you won't lose any order history, etc, etc.

Dump the entire table.

 

Why are you trying to move the data to a new database anyway ?

Link to comment
Share on other sites

why don't you simply copy the entire database - not just the customers tables ?

also then you won't lose any order history, etc, etc.

Dump the entire table.

 

Why are you trying to move the data to a new database anyway ?

 

You can't copy the entire database if you have changed all the categories, products and product attributes.

 

I'm trying to move the the data to a new database because it's a new store with more tables in the database. I found the answer. If you make .sql files from both databases and cut and paste the info you want to transfer from one file to another, you can delete what you don't want to transfer, & it will auto-increment the new tables for you (it will be the last digit you'll see in address_book, for example). I deleted the old tables first and just copied the info in the .sql file from each other and made a new customer list. Then repair and optimize to be cool.

If you say you can't do it, you're only fooling yourself.

Link to comment
Share on other sites

...and make sure the customer_id values are unique to the customer, and are constant for a particular customer across the three tables. If you root around in address_book, customer, and customer_info, you'll see the values I'm referring to.

If you say you can't do it, you're only fooling yourself.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...