method getValuesCount documentation in bbn\Db
Return a string with the sql query to count equal values in a field of the table.
Example
X::dump($db->getValuesCount('table_users','name',['surname','=','smith']));
/*
(string)
SELECT COUNT(*) AS num, `name` AS val FROM `db_example`.`table_users`
GROUP BY `name`
ORDER BY `name`
function($table, string $field = NULL, array $where = [], array $order = [])
{
return $this->countFieldValues($table, $field, $where, $order);
}
Return a string with the sql query to count equal values in a field of the table. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2025
BBN Solutions