mongodb\Query count()

count() public method

Returns the number of records.

public integer count ( $q = '*', $db = null )
$q string

Kept to match yii\db\QueryInterface, its value is ignored.

$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 integer

Number of records

throws yii\mongodb\Exception

on failure.

doc_Yii
2016-10-30 17:08:56
Comments
Leave a Comment

Please login to continue.