Welcome Guest, Not a member yet? Register   Sign In
Cannot add or update a child row: a foreign key constraint fails
#4

I tried something different today:
PHP Code:
    public function man_insert2()
    {
        $data=  [
            'alias' =>  'AbCxExGh',
            'status'    =>  0,
            'description'  =>  'Manual SQL Test',
            'livestream_id' =>  5,
            'type'  =>  'public'
        ];
        $LiveOutputModel = new LiveOutputModel();
        print_r($data);
        $LiveOutputModel->insert($data);
    

Unfortunately still the same error, oddly enough the array is exactly the same as with the manual SQL query. So clearly there's something wrong when using the model to insert the data:
[Image: Screen-Shot-2022-06-14-at-20-06-58.png]
Again, I'd greatly appreciate any input on this matter!
Reply


Messages In This Thread
RE: Cannot add or update a child row: a foreign key constraint fails - by Sincere - 06-14-2022, 05:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB