can not add or update a child row a foreign key constraint fails laravel

0

I'm having this error in my laravel system:

cannot add or update a child row a foreign key constraint fails laravel

It informs you that the ID does not exist, only that it exists. Even when I try to perform the insertion manually this error is displayed.

    
asked by anonymous 09.07.2018 / 17:20

1 answer

1

From a select in your tbl_respuestas table and see if the fields search_id, question_id and option_id are not 0.

If yes, change to null and try again.

    
09.07.2018 / 22:23