-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6660 from domaingenerator/modify-insert-method-de…
…tails Modify the user guide of the insert() method to include the second parameter
- Loading branch information
Showing
2 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,11 @@ | |
'email' => '[email protected]', | ||
]; | ||
|
||
// Inserts data and returns inserted row's primary key | ||
$userModel->insert($data); | ||
|
||
// Inserts data and returns true on success and false on failure | ||
$userModel->insert($data, false); | ||
|
||
// Returns inserted row's primary key | ||
$userModel->getInsertID(); |