Returns the number of records.
public count ( string $q = '*', |
||
$q | string | the COUNT expression. Defaults to '*'. Make sure you properly [quote](guide:db-dao#quoting-table-and-column-names) column names in the expression. |
$db | the database connection used to generate the SQL statement. If this parameter is not given (or null), the `db` application component will be used. | |
리턴 | 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. |