Insert return false but inserts succesfully - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Insert return false but inserts succesfully (/showthread.php?tid=79909) |
Insert return false but inserts succesfully - BFlokstra - 08-13-2021 I'm wreaking my brain, unable to figure this one out. I have the folowing code: PHP Code: if ($klantenModel->insert([ What happens is dat the insert does what I expect (it inserts the data without a glitch), yet it returns false. And I can't figure out why. It doesn't insert empty columns, the data types of the respective columns in the database are correct (int for id and varchar(100) for the others). I hope you guys can help me figure out what the cause of this behavior is. RE: Insert return false but inserts succesfully - InsiteFX - 08-13-2021 Try thios and see what your query is looking like. PHP Code: $db->insertID(); Please show it here. |