I am trying to import products in magento through a csv file.
I got this error while importing the file.
please suggest me how resolve this error
I got the following error
SQLSTATE[23000]: **Integrity constraint violation: 1452** Cannot add or update a child row: a foreign key constraint fails
(`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)
It seems that you CSV data file has some row(s) containing product id that doesn't exist in
catalog_product_entity
. Therefore it throws such exception. I think you need to verify product id value of imported CSV file.