db_count

Perform a count query on the database and return the count

Parameters
string $arg1

The SQL query string or table name

#
string|array $arg2 = null

The field name to count on or the array of placeholders and their values if the first argument is SQL

#
string|null $arg3 = null

The field alias if the first argument is table name or the second argument is field name

#
Returns
int|QueryBuilder

The result count or QueryBuilder