mysql insert not working

Hello,

I am working with a table that has the structure in the attached screen shot.

I went to insert a row and got this error:

SQL query: Edit Edit

INSERT INTO `d_mage`.`catalog_product_entity-SKUS` (
`entity_id` ,
`entity_type_id` ,
`attribute_set_id` ,
`type_id` ,
`sku` ,
`has_options` ,
`required_options` ,
`created_at` ,
`updated_at`
)
VALUES (
'55555555', '', '', 'simple', '51515151', '0', '0', NOW( ) , NOW( )
)

MySQL said: Documentation
#1452 - Cannot add or update a child row: a foreign key constraint fails (`d_mage`.`catalog_product_entity-SKUS`, CONSTRAINT `FK_CAT_PRD_ENTT_ENTT_TYPE_ID_EAV_ENTT_TYPE_ENTT_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id)

Can you please help me figure out how I can insert a row without getting an error.

Thanks
Matt
Screen-Shot-2012-09-22-at-12.38..jpg
LVL 1
movieprodwAsked:
Who is Participating?
 
zicevaCommented:
Most likely the "simple" value of the "type_id" is wrong. Take a look at the table named "eav_entity_type" and see what is the ID of the type "simple" and use that ID.
0
 
movieprodwAuthor Commented:
You were correct that worked.

How about this.

When I go to delete the test one I just created it stalls the server and I had to restart.
0
 
movieprodwAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.