Determine if CodeIgniter’s Model Save() is Insert or Update |
I have been playing with this functionality.
If I use PHP Code: $this->getInsertID() PHP Code: insertID() I've checked the DB and all seems in order. Therefore it looks like I can use the save() function to insert and update, and return the insert id when an insert is performed. PHP Code: public function addEditData($vals) { I have been playing with this functionality. If I use PHP Code: $this->getInsertID() PHP Code: insertID() I've checked the DB and all seems in order. Therefore it looks like I can use the save() function to insert and update, and return the insert id when an insert is performed. PHP Code: public function addEditData($vals) { |
Messages In This Thread |
Determine if CodeIgniter’s Model Save() is Insert or Update - by 68thorby68 - 12-28-2020, 03:41 AM
RE: Determine if CodeIgniter’s Model Save() is Insert or Update - by 68thorby68 - 12-28-2020, 05:02 AM
RE: Determine if CodeIgniter’s Model Save() is Insert or Update - by sammyskills - 12-28-2020, 08:28 AM
RE: Determine if CodeIgniter’s Model Save() is Insert or Update - by InsiteFX - 12-28-2020, 01:01 PM
RE: Determine if CodeIgniter’s Model Save() is Insert or Update - by includebeer - 12-30-2020, 07:55 AM
|