BABO_LOHAR Posted February 26, 2014 Posted February 26, 2014 I have online store with customers records and orders. Besides updates at mine local machine when try to import database on live server getting error Error SQL query: -- -- Dumping data for table `address_book` -- INSERT INTO `address_book` ( `address_book_id` , `customers_id` , `entry_gender` , `entry_company` , `entry_firstname` ,`entry_lastname` , `entry_street_address` , `entry_suburb` , `entry_postcode` , `entry_city` , `entry_state` , `entry_country_id` ,`entry_zone_id` ) VALUES ( 1, 1, 'm', 'Alphas', 'babo', 'lohar', 'Head Marala Road', '', '51310', 'City', 'Province', 162, 0 ) ; MySQL said: #1062 - Duplicate entry '1' for key 'PRIMARY' If delete all tables from live server then import new database from local machine works fine but customers records got vanished I need to keep customers records HELP !
Jack_mcs Posted February 26, 2014 Posted February 26, 2014 The table keeps track of the id's and that error is saying you have duplicate id's, which isn't allowed. If you want to merge the two, you will have to adjust the local one to add at the end of the live one. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
BABO_LOHAR Posted February 27, 2014 Author Posted February 27, 2014 Jack can you please explain how can i Fix it ?
MrPhil Posted March 2, 2014 Posted March 2, 2014 You can't simply blindly import a set of customer records from one store into another store's database. There will be duplicate customer IDs etc. (database keys). Merging store databases can be done, but it's complicated and you need to really understand databases. It will involve assigning new customer IDs (etc.) to one set and updating all references to those IDs throughout the database. This will eliminate the collision of IDs. Don't attempt it unless you know what you're doing, or can afford to hire someone who really can show they know what they're doing.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.