db\Query sum()

sum() public method

Returns the sum of the specified column values.

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

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

$db yii\db\Connection

The database connection used to generate the SQL statement. If this parameter is not given, the db application component will be used.

return mixed

The sum of the specified column values.

doc_Yii
2016-10-30 16:59:05
Comments
Leave a Comment

Please login to continue.