Query Builder's insert method return type |
Hey there,
I'm trying to insert some data into a database using the Query Builder's insert method. According to the documentation, the insert method returns a boolean value. https://codeigniter.com/user_guide/datab...tml#insert However, the function seems to return a database result object upon success. The source appears to confirm this: https://github.com/codeigniter4/CodeIgni....php#L2249 PHP Code: $success = $this->db->table('MyTable') Is this deviation between the documentation and the actual behavior intentional? How can I check that the insert statement completed successfully? Can I be sure that the insert statement always returns false on failure? I appreciate any input |
Messages In This Thread |
Query Builder's insert method return type - by Lorenz - 10-13-2020, 08:17 AM
RE: Query Builder's insert method return type - by shuwar - 02-04-2021, 01:05 PM
RE: Query Builder's insert method return type - by InsiteFX - 02-04-2021, 04:12 PM
RE: Query Builder's insert method return type - by shuwar - 02-04-2021, 11:15 PM
RE: Query Builder's insert method return type - by InsiteFX - 02-05-2021, 12:45 PM
RE: Query Builder's insert method return type - by kenjis - 02-05-2021, 05:52 PM
|