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

search for in the

MongoCursor::immortal> <MongoCursor::hasNext
[edit] Last updated: Fri, 14 Jun 2013

view this page in

MongoCursor::hint

(PECL mongo >=0.9.0)

MongoCursor::hintGives the database a hint about the query

Description

public MongoCursor MongoCursor::hint ( mixed $index )

Parameters

index

Index to use for the query. If a string is passed, it should correspond to an index name. If an array or object is passed, it should correspond to the specification used to create the index (i.e. the first argument to MongoCollection::ensureIndex()).

Return Values

Returns this cursor.

Errors/Exceptions

Throws MongoCursorException if this cursor has started iterating.

Changelog

Version Description
1.4.0

The index argument now supports index names as string values. In versions before 1.4.0, only array or object values were accepted.



add a note add a note User Contributed Notes MongoCursor::hint - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites