Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error 1062-Duplicate entry "19" for key 1


araisi

Recommended Posts

Hello everyone!

 

When my customers try to confirm their orders they get this error:

 

1062 - Duplicate entry '19' for key 1

 

insert into orders (orders_id, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, date_purchased, orders_status, currency, currency_value) values ('19', '21',.......... etc. etc. etc.

 

[TEP STOP]

 

I tried every solution that I found in these forums, but none of them worked for me..

 

Could someone please help me in solving this problem, and thus preventing me from pulling my hair off.

 

Cheers,

Ali

Link to comment
Share on other sites

Ali, go to your host's cpanel, and log into the databases / phpmyadmin section. Bring up your database. Look at the orders table. Something isn't right about it. Most likely, something is set to "autoincrement" that shouldn't be.

 

If you don't see anything, then run a "repair" on that table. This can be done through phpmyadmin. This should definitely solve your problem.

 

If that still doesn't solve your problem (remember to clear your cache), then we can start talking about truncating tables, although we don't want to truncate any orders! So let's forget about that option for now. Look for the autoincrement that shouldn't be, and try using the 'repair' option from your host's cpanel on that database.

 

Good luck and keep me updated.

Jason

 

Simple 1-2-3 Intructions on how to get, install and configure SSL

 

The Google Sandbox explained

 

Simple to follow instructions on how to change the look of your OSC

 

How To Make A Horrible OSC Website

 

my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP

 

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

Link to comment
Share on other sites

Ali, go to your host's cpanel, and log into the databases / phpmyadmin section. Bring up your database. Look at the orders table. Something isn't right about it. Most likely, something is set to "autoincrement" that shouldn't be.

 

If you don't see anything, then run a "repair" on that table. This can be done through phpmyadmin. This should definitely solve your problem.

 

If that still doesn't solve your problem (remember to clear your cache), then we can start talking about truncating tables, although we don't want to truncate any orders! So let's forget about that option for now. Look for the autoincrement that shouldn't be, and try using the 'repair' option from your host's cpanel on that database.

 

Good luck and keep me updated.

 

Thank you for your reply Jason,

 

I did what you told me to: I checked the Order table and the only autoincrement enabled one was the orders_id, which I assume should be the correct one...

 

I also ran a repair on the whole table (from the operations menu) AND cleared my cache, and it STILL won't work.

 

btw. I forgot to mention that I have tried to change the "Next Autoindex" from its previous value of 20 to 25..but it didn't work either...I'm really out of ideas

 

Thank you,

Ali

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...