Determine if CodeIgniter’s Model Save() is Insert or Update |
From the docs,
Quote:This (save()) is a wrapper around the insert() and update() methods that handle inserting or updating the record automatically, based on whether it finds an array key matching the $primaryKey value: So, to check if it is an insert() or update() method, I'll suggest you do that by checking your $primaryKey. |
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
|