count() public method
Returns the number of records.
public integer|string count ( $q = '*', $db = null ) | ||
---|---|---|
$q | string |
The COUNT expression. Defaults to '*'. 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 (or null), the |
return | integer|string |
Number of records. The result may be a string depending on the underlying database engine and to support integer values higher than a 32bit PHP integer can handle. |
Please login to continue.