Magento: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘XX-XX’ for key “PRIMARY”

Just Run This code in SQL


<code><code>TRUNCATE `sales_flat_quote`;
 ALTER TABLE `sales_flat_quote` AUTO_INCREMENT=1;
 TRUNCATE `sales_flat_quote_address`;
 ALTER TABLE `sales_flat_quote_address` AUTO_INCREMENT=1;
 TRUNCATE `sales_flat_quote_address_item`;
 ALTER TABLE `sales_flat_quote_address_item` AUTO_INCREMENT=1;
 TRUNCATE `sales_flat_quote_item`;
 ALTER TABLE `sales_flat_quote_item` AUTO_INCREMENT=1;
 TRUNCATE `sales_flat_quote_item_option`;
 ALTER TABLE `sales_flat_quote_item_option` AUTO_INCREMENT=1;
 TRUNCATE `sales_flat_quote_payment`;
 ALTER TABLE `sales_flat_quote_shipping_rate` AUTO_INCREMENT=1;</code></code>

TRUNCATE `log_customer`;
 ALTER TABLE `log_customer` AUTO_INCREMENT=1;
 TRUNCATE `log_quote`;
 ALTER TABLE `log_quote` AUTO_INCREMENT=1;
 TRUNCATE `log_summary`;
<div></div>
ALTER TABLE `log_summary` AUTO_INCREMENT=1;
 TRUNCATE `log_summary_type`;
 ALTER TABLE `log_summary_type` AUTO_INCREMENT=1;
 TRUNCATE `log_url`;
 ALTER TABLE `log_url` AUTO_INCREMENT=1;
 TRUNCATE `log_url_info`;
 ALTER TABLE `log_url_info` AUTO_INCREMENT=1;
 TRUNCATE `log_visitor`;
 ALTER TABLE `log_visitor` AUTO_INCREMENT=1;
 TRUNCATE `log_visitor_info`;
 ALTER TABLE `log_visitor_info` AUTO_INCREMENT=1;
 TRUNCATE `report_event`;
 ALTER TABLE `report_event` AUTO_INCREMENT=1;

for more info visit mage-people

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: