mongodb\Collection findOne()

findOne() public method

Returns a single document.

public array|null findOne ( $condition = [], $fields = [], $options = [] )
$condition array

Query condition

$fields array

Fields to be selected

$options array

Query options (available since 2.1).

return array|null

The single document. Null is returned if the query results in nothing.

doc_Yii
2016-10-30 17:07:38
Comments
Leave a Comment

Please login to continue.