magneto在意外情况下报错Magento SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry,出现这个问题最有可能是数据库因为非法重启关机等情况造成的。
去phpmyadmin里面把这几个表清空了,反正都是访问日志,一般这么处理后都会好。
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;
TRUNCATE `log_customer`;
ALTER TABLE `log_customer` AUTO_INCREMENT=1;
TRUNCATE `log_quote`;
ALTER TABLE `log_quote` AUTO_INCREMENT=1;
TRUNCATE `log_summary`;
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;
|