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

前端 未结 7 1228
天命终不由人
天命终不由人 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:14

    In my case , its no problem in SQL commands , but the inputs was not sending as $request , so in php.ini file :

    max_input_vars was 1000 by default and I changed it to :

    max_input_vars = 2000
    

    then you have to restart web server .

提交回复
热议问题