mongodb\Query one()

one() public method

Executes the query and returns a single row of result.

public array|boolean one ( $db = null )
$db yii\mongodb\Connection

The Mongo connection used to execute the query. If this parameter is not given, the mongodb application component will be used.

return array|boolean

The first row (in terms of an array) of the query result. False is returned if the query results in nothing.

doc_Yii
2016-10-30 17:09:00
Comments
Leave a Comment

Please login to continue.