downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

MongoCollection::getDBRef> <MongoCollection::find
Last updated: Fri, 20 Nov 2009

view this page in

MongoCollection::findOne

(PECL mongo >=0.9.0)

MongoCollection::findOneQuerys this collection, returning a single element

Description

public array MongoCollection::findOne ([ array $query = array() [, array $fields = array() ]] )

Parameters

query

The fields for which to search.

fields

Fields of the results to return.

Return Values

Returns record matching the search or NULL.

Errors/Exceptions

Throws MongoConnectionException if it cannot reach the database.



add a note add a note User Contributed Notes
MongoCollection::findOne
There are no user contributed notes for this page.

MongoCollection::getDBRef> <MongoCollection::find
Last updated: Fri, 20 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites