Wishlist 0 ¥0.00

数据库出错提示Duplicate entry * for key *的解决方法

错误编号:1062

错误提示:

查询语句错误[1062]
ERR: Duplicate entry '16777215' for key 'PRIMARY'
SQL: INSERT INTO forum_attachment SET `tid`='0',`pid`='0',`uid`='1',`tableid`='127'
PHP: misc.php:0058 -> source/module/misc/misc_swfupload.php:0089 -> source/class/class_forumupload.php:0106 -> source/function/function_core.php:2484 -> source/class/class_core.php:0930
User: uid=1; IP=183.7.77.81; RIP:183.7.77.81 Request: /bbs/misc.php?mod=swfupload&operation=upload&type=file&inajax=yes&infloat=yes&simple=2

 

问题分析:

向唯一字段插入相同数据。

解决方法:

方法1、请检查程序是否做了修改,如果修改过,建议用我们的原程序覆盖您的修改,再次检查问题。

方法2、用phpmyadmin或tools工具修复出错表,如果还没修复可方法3手动修复。

方法3、如果您的站点上有 phpMyAdmin ,还可以通过他检查下您的数据库中出错的表的自增字段的当前自增值是否和该表中自增字段的最大值相同,如果相同则会出现该错误。

方法4、如果您正在转移数据库,请确认数据库的版本是否相同。

方法5、如果以上方法还未解决,请恢复备份,用 DBCheck 将数据库检验为标准结构,并且重新开始升级。

About Us

Since 1996, our company has been focusing on domain name registration, web hosting, server hosting, website construction, e-commerce and other Internet services, and constantly practicing the concept of "providing enterprise-level solutions and providing personalized service support". As a Dell Authorized Solution Provider, we also provide hardware product solutions associated with the company's services.
 

Contact Us

Address: No. 2, Jingwu Road, Zhengzhou City, Henan Province

Phone: 0086-371-63520088 

QQ:76257322

Website: 800188.com

E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.