Cenkos Posted November 20, 2003 Posted November 20, 2003 :( Hello all, I implemented OS commerce in three of my sites, in one of them it worls a treat, however I have problems in the other two. Without even altering anything, as soon as the shop is set up, I am trying to register as new customer but getting the below message. Your help will be much appreciated. 1062 - Duplicate entry '1' for key 1 insert into address_book (customers_id, address_book_id, entry_firstname, entry_lastname, entry_street_address, entry_postcode, entry_city, entry_country_id, entry_gender, entry_company, entry_suburb, entry_zone_id, entry_state) values ('3', '1', 'Mike', 'Green', '66 Tavistock Drive', 'NG35DW', 'Nottingham', '222', 'm', '', '', '0', 'Notts') [TEP STOP] B]
mortsahl Posted November 20, 2003 Posted November 20, 2003 Are all 3 sites pointing to the same instance of the database? If so, that's your problem. When installing, use different names from the database for each site.
kalukee Posted December 3, 2003 Posted December 3, 2003 I did the same thing,(having mutiple sites refering to the same database) and came up with the same problem SO I tried to clear the offending tables of their data and still get the error I've done these tables, What am I missing here?? Thanks (Clearing everything and starting over is not an option) DELETE FROM address_book; DELETE FROM customers; DELETE FROM customers_basket; DELETE FROM customers_basket_attributes; DELETE FROM customers_info; DELETE FROM orders; DELETE FROM orders_products; DELETE FROM orders_products_attributes; DELETE FROM orders_products_download; DELETE FROM orders_total; ALTER TABLE customers AUTO_INCREMENT = 1; ALTER TABLE orders AUTO_INCREMENT = 1;
Guest Posted December 3, 2003 Posted December 3, 2003 I believe that each 'site' must run on its own database. If you have 3 sites you'll need 3 separate MySQL databases, one for each site.
kalukee Posted December 3, 2003 Posted December 3, 2003 My intent was not to have multiple stores, I wanted to have a working copy of the original install to go back to after(if) I messed up making mods to my live store. Anyways, I fixed it by droping the address_book table all together and rebuilding it DROP TABLE IF EXISTS address_book; CREATE TABLE address_book ( customers_id int(11) NOT NULL default '0', address_book_id int(11) NOT NULL default '1', entry_gender char(1) NOT NULL default '', entry_company varchar(32) default NULL, entry_firstname varchar(32) NOT NULL default '', entry_lastname varchar(32) NOT NULL default '', entry_street_address varchar(64) NOT NULL default '', entry_suburb varchar(32) default NULL, entry_postcode varchar(10) NOT NULL default '', entry_city varchar(32) NOT NULL default '', entry_state varchar(32) default NULL, entry_country_id int(11) NOT NULL default '0', entry_zone_id int(11) NOT NULL default '0', PRIMARY KEY (address_book_id,customers_id) ) TYPE=MyISAM;
Recommended Posts
Archived
This topic is now archived and is closed to further replies.