Error 1062 - create_account_process

jcroson <[email protected]>
Newsgroups gmane.comp.web.oscommerce.general
Message-ID <40a342007240fd1a7670d48b01820712@osCommerce-Forums>
This message was sent from: General Support
http://forums.oscommerce.com/viewtopic.php?p=227943#227943
----------------------------------------------------------------

I am having fits figuring this one out, and would be WAY grateful if anyone has a solution.

Conditions using 2.2-MS1
1. My customers table is empty.
2. I enter a test customer successfully.
3. Whenever I try to enter another customer, I get this error:

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 ('25', '1', 'Test', 'Testing', '8484 blabla', '12345', 'Nowhere', '223', 'm', '', '', '64', '')

[TEP STOP]

I currently have one customer registered, and it is clear that this one fails because of the entry number wanting to be "1". The code for this is in the aforementioned file create_account_process.php:

[code]    $sql_data_array = array('customers_id' => $customer_id,
                            'address_book_id' => 1,
                            'entry_firstname' => $firstname,
                            'entry_lastname' => $lastname,
                            'entry_street_address' => $street_address,
                            'entry_postcode' => $postcode,
                            'entry_city' => $city,
                            'entry_country_id' => $country);[/code]

I suppose I'll try and change the address_id in the address_book table to NOT auto-increment...we'll see.

JC
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.