insert() return null - 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 null (/showthread.php?tid=76595) |
insert() return null - pws - 05-30-2020 Hello, i using CI4 and i call method insert() and i set all required params but function return 0! why? how i can get error message if is exist! My code is: PHP Code: namespace App\Models; PHP Code: $signup_email=$this->request->getVar('signup_email'); RE: insert() return null - InsiteFX - 05-30-2020 returns - bool - TRUE on success, FALSE on failure I would double check your coding. RE: insert() return null - pws - 05-30-2020 (05-30-2020, 08:24 AM)InsiteFX Wrote: returns - bool - TRUE on success, FALSE on failureis return true but nothing added in table users in DB!! RE: insert() return null - dave friend - 05-30-2020 (05-30-2020, 08:26 AM)pws Wrote: is return true but nothing added in table users in DB!! If it returns 0 (like you said in the start) then it is returning false. 0==false RE: insert() return null - pws - 05-30-2020 (05-30-2020, 11:56 AM)dave friend Wrote:how i can know what's the error exactly? have method to return sql error?(05-30-2020, 08:26 AM)pws Wrote: is return true but nothing added in table users in DB!! |