Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1062 - Duplicate entry '1-8' for key 1.... :( help please...


Guest

Recommended Posts

Any idea where this error is coming from. I get when trying to create a new account...

 

 

1062 - Duplicate entry '1-8' 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_zone_id, entry_state) values ('8', '1', 'asd', 'Harvey', 'aaaadasa asd', 'aaaaa', 'aaaaa', '223', '29', '')

 

 

Thanks

 

Tracy

Link to comment
Share on other sites

  • 3 months later...

I think I figured it out.

 

I found that after some testing and more testing, I was getting the orders sometimes and not allways, so I narrowed it down.

 

I changed the primary key in the table that was getting the error to auto increment...

 

I'll post again if I get it again,, but i think I found the solution. I am getting the emails now and it is not duplicating it in admin.

 

Praise GOD!

Link to comment
Share on other sites

I also changed the auto-increment field to address_book_id and it is working for me too now. However, you will notice that all your old address_book entries (before your upgrade) usually have a address_book_id of 1. Therefore this means they are going to have to be changed to reflect their correct id. If you don't change them, customers will not have primary addresses, which in turn causes more problems. I am working on a solution, and I will keep you informed as soon as I nail it.

In the meantime if you know of a thread for fixing the primary error, please let me know.

Link to comment
Share on other sites

Ok folks, I have figured out the address book problems. You will have to go through the address_book table and assign a unique id to each customer's address_book_id(s). Once you have assigned each one with a unique identity, you will have to edit the customers table and set each customers default_customer_address_id to correspond with the new unique id you created for their address. I built a simple php script to do the work for me, I will see if I can find it.

Link to comment
Share on other sites

  • 2 weeks later...
Ok folks, I have figured out the address book problems. You will have to go through the address_book table and assign a unique id to each customer's address_book_id(s). Once you have assigned each one with a unique identity, you will have to edit the customers table and set each customers default_customer_address_id to correspond with the new unique id you created for their address. I built a simple php script to do the work for me, I will see if I can find it.

 

Hi Ryan,

Can you please post the script u used to fix this problem?

 

Thank you.

Link to comment
Share on other sites

Should both the customer ID and the address book ID be the primary on the address book table?

 

I am assuming that only the address book ID should be autoincrement correct? PHP MY ADMIN only allows one Primary to be autoincrement on the table..

 

tha customer table / customer ID is auto increment on that table.

 

thanks...

 

 

my previous post about fixing was actually for the "orders products attributes" table.

Link to comment
Share on other sites

okay now im getting an error when I try and log in. thi sis what I get::

 

 

 

Query was empty - Query was empty

 

Query was empty

 

[TEP STOP]

 

Query was empty - Query was empty

 

Query was empty

 

[TEP STOP]

 

 

Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

Link to comment
Share on other sites

i tried creating a new account and it works but I cannot login with an existing account.. I get the same erroras above. please help....

Link to comment
Share on other sites

  • 1 month later...

What I did after installing the PWA contrib (which did'nt help) was to change the the customers_id to auto_increment as the first, then address_id not to auto_increment.

 

This worked for me. Might work with others.

 

Worth a try.

 

Neil.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...