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
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.