0
votes

This error show every..*.**please help me for the exact answer for this qyery...

SQLSTATE[23000]: Integrity constraint violation: 1452

Cannot add or update a child row: a foreign key constraint fails (mydawai.cataloginventory_stock_item, CONSTRAINT FK_CATINV_STOCK_ITEM_PRD_ID_CAT_PRD_ENTT_ENTT_ID FOREIGN KEY (product_id) REFERENCES catalog_product_entity (entity_id) ON DELETE CA)

i'm importing the 20 to 50 thousand csv product they will show an error but if part into the 500 hundred -500 hundred list than some of the product will be importing and someone showing error of sql 23000. Integrity constraint violation: 1452 ?

2
You tried to insert a record that'd be an orphan. there's nothing we can do to help you, since you haven't shown ANYTHING of what you're trying to do. - Marc B
What is the definition of the tables cataloginventory_stock_item and catalog_product_entity? - Kryptos
Please edit your question, try to improve the formatting, and ask an actual question. - James
u will do utf 8 format convert - Akhil Jain

2 Answers

1
votes

its means that there is a foreign key that is not satisfied (ie you need it to exist but it doesnt)

catalog_product_entity must have and entry for entity_id which is then referenced as product_id in cataloginventory_stock_item. enter image description here

2
votes

You need to remove any special chacarter in your Csv File. like ©, '', º Thats works for me !