Magento SQL 错误
您是否知道
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1421062-85-1-2' for key 1
尝试保存产品(BO 和 FO)时出现的此错误
Do you have an idea about this error
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1421062-85-1-2' for key 1
it appears when trying to save a product (BO and FO)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的 ALTER TABLE 代码语法错误。前两行缺少两个 (。已更新:
Your syntax is wrong on the ALTER TABLE code. It's missing two ('s in the first two lines. Here's updated:
我在将 1.3 升级到 1.4 时遇到了同样的问题:事实证明,有很多重复的条目(是的,“这就是她说的”)。
解决方案是找到并消灭它们。这里是找到它们的代码:
然后添加唯一键:
并考虑乔纳森的评论:)
I've had this same problem when upgrading a 1.3 to 1.4: it turned out that there was a lot of duplicates entries (yay, "that's what she said").
Solution was to locate and eliminate them. Here the code to locate them:
and then add the unique keys:
And take Jonathan's comment into account :)