SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails

前端 未结 7 1204
天命终不由人
天命终不由人 2020-12-06 17:01

I am trying to insert values into my comments table and I am getting a error. Its saying that I can not add or update child row and I have no idea what that means. My schema

相关标签:
7条回答
  • 2020-12-06 17:22

    It just simply means that the value for column country on table comments you are inserting doesn't exist on table country_type or you are not inserting value for country on table user. Bear in mind that the values of column country on table comments is dependent on the values of ID on table country_type.

    0 讨论(0)
提交回复
热议问题