This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated changelog and readme [ci skip]
- Loading branch information
1 parent
9cd6ccf
commit b64f8af
Showing
2 changed files
with
6 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -393,7 +393,11 @@ $users = $db->select('name,age')->where('email','LIKE','@gmail.com')->results(); | |
// Instead of returning users, how about just count how many users are found. | ||
$totalUsers = $db->where('email','LIKE','@gmail.com')->count(); | ||
|
||
// Delete using custom filters (this will act like a bulk delete) | ||
|
||
// You can delete all documents that match the query (BULK DELETE) | ||
$db->where('name','LIKE','john')->delete(); | ||
|
||
// Delete all items that match query and match custom filter | ||
$db->where('name','LIKE','john')->delete(function($item){ | ||
return ($item->name == 'John' && $item->email == '[email protected]'); | ||
}); | ||
|