mongodb\Query sum()

sum() public method

Returns the sum of the specified column values.

public integer sum ( $q, $db = null )
$q string

The column name. Make sure you properly quote column names in the expression.

$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

The sum of the specified column values

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

Please login to continue.