update : 2015.11.03
php.shukuma.com

검색:
 
 
Gives the database a hint about the query

MongoCursor::hint

(PECL mongo >=0.9.0)

MongoCursor::hintGives the database a hint about the query

설명

public MongoCursor MongoCursor::hint ( mixed $index )

인수

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()).

반환값

Returns this cursor.

오류/예외

Throws MongoCursorException if this cursor has started iterating.

변경점

버전 설명
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.