Php SQLSTATE[23000]:完整性约束冲突:1452无法添加或更新子行:外键
我得到这个错误: SQLSTATE[23000]:完整性约束冲突:1452无法添加或更新子行:外键约束失败(Php SQLSTATE[23000]:完整性约束冲突:1452无法添加或更新子行:外键,php,mysql,sql,magento,Php,Mysql,Sql,Magento,我得到这个错误: SQLSTATE[23000]:完整性约束冲突:1452无法添加或更新子行:外键约束失败(abc\u dbsales\u flat\u order\u item,约束sales\u flat\u order\u item\u ibfk\u 1外键(order\u id)引用sales\u flat\u order\u order\u iter(实体id) 我使用的是Magento 1.9.0.1。如果没有引用sales\u flat\u order表中现有实体id的订单id,则
abc\u db
sales\u flat\u order\u item
,约束sales\u flat\u order\u item\u ibfk\u 1
外键(order\u id
)引用sales\u flat\u order\u order\u iter
(实体id
)
我使用的是Magento 1.9.0.1。如果没有引用sales\u flat\u order表中现有实体id的订单id,则无法添加sales\u flat\u order\u项目行。我认为这是Magento特有的问题。也许最好在magento stackexchange站点中询问。我已经检查了此处提供的所有解决方案,并从其他来源获得了这些解决方案,没有任何结果。何时发生此错误?在管理系统中进行更改时?当重新编制索引时?是的,我知道,实际上,两个表中都成功地创建了产品