fifths / php-mongo
php mongodb class
Installs: 18
Dependents: 0
Suggesters: 0
Security: 0
Stars: 13
Watchers: 2
Forks: 12
Open Issues: 1
pkg:composer/fifths/php-mongo
Requires
- php: >=7.0
This package is auto-updated.
Last update: 2025-10-15 06:59:41 UTC
README
composer require fifths/php-mongo
##Select Method
selectGet select fields from returned documentswhereWhere section of the querywhere_inWhere something is in an array of somethingwhere_in_allWhere something is in all of an array of * somethingwhere_not_inWhere something is not in array of somethingwhere_orWhere something is based on orwhere_gtWhere something is greater than somethingwhere_gteWhere something is greater than or equal to somethingwhere_ltWhere something is less than somethingwhere_lteWhere something is less than or equal to somethingwhere_betweenWhere something is in between to somethingwhere_between_neWhere something is in between and but not equal to somethingwhere_neWhere something is not equal to somethingorder_byOrder the resultslimitORoffsetLimit the number of returned resultscountDocument Count based on where querydistinctRetrieve a list of distinct values for the given key across a single collectionfindRetrieve single document from collection
##Update Method
setSets a field to a valueunset_fieldUnsets a fieldaddtosetAdds a value to an array if doesn't existpushPushes a value into an array fieldpopPops a value from an array fieldpullRemoves an array by the value of a fieldrename_fieldRename a fieldincIncrements the value of a fieldmulMultiple the value of a fieldmaxUpdates the value of the field to a specified value if the specified value is greater than the current value of the fieldminUpdates the value of the field to a specified value if the specified value is less than the current value of the field.updateUpdate a single document in a collectionupdate_allUpdate all documents in a collection
##Delete Method
deleteDelete a single document in a collectiondelete_allDelete all documents in a collection
##Aggregation Method
aggregatePerform aggregation query on document
##Index Method
add_indexCreate a new index on collectionremove_indexRemove index from collectionlist_indexesShow all index created on collections
##DB Method
switch_dbSwitch to a different databasedrop_dbDrops a databasedrop_collectionDrops a collection