Werbung
MongoCollection::findOne
(PECL mongo >=0.9.0)
MongoCollection::findOne — Querys this collection, returning a single element
Beschreibung
public array MongoCollection::findOne
([ array $query = array()
[, array $fields = array()
]] )
Parameter-Liste
- query
-
The fields for which to search.
- fields
-
Fields of the results to return.
Rückgabewerte
Returns record matching the search or NULL.
Fehler/Exceptions
Throws MongoConnectionException if it cannot reach the database.