3
votes

I am getting this error:

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (abc_db.sales_flat_order_item, CONSTRAINT sales_flat_order_item_ibfk_1 FOREIGN KEY (order_id) REFERENCES sales_flat_order (entity_id))

I am using Magento 1.9.0.1.

2
I have checked all the solution available here and form other sources,nothing is workngAbdul Ghaffar
When does this error occur? When making changes in the admin? When reindexing?BonnevilleSlim

2 Answers

3
votes

You cannot add a sales_flat_order_item row without having order_id referencing an existing entity_id from the sales_flat_order table

0
votes

I believe this is a magento specific question. Perhaps it is better to ask in the magento stackexchange site.