我收到这个错误:
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (
abc_db
.sales_flat_order_item
, CONSTRAINTsales_flat_order_item_ibfk_1
FOREIGN KEY (order_id
) REFERENCESsales_flat_order
(entity_id
))
我正在使用 Magento 1.9.0.1。
最佳答案
如果 order_id 引用 sales_flat_order 表中现有的 entity_id,则无法添加 sales_flat_order_item 行
关于php - SQLSTATE[23000] : Integrity constraint violation: 1452 Cannot add or update a child row:a foreign key,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32517891/