method stat documentation in bbn\Db\Languages\Sql
Return an array with the count of values corresponding to the where conditions.
Example
X::dump($db->stat('table_user', 'name', ['name' => '%n']));
/* (array)
[
[
"num" => 1,
"name" => "alan",
], [
"num" => 1,
"name" => "karen",
],
]
function(string $table, string $column, array $where = [], array $order = [])
{
if ($this->check()) {
return $this->rselectAll(
[
'tables' => [$table],
'fields' => [
$column,
'num' => 'COUNT(*)'
],
'where' => $where,
'order' => $order,
'group_by' => [$column]
]
);
}
return null;
}
Return an array with the count of values corresponding to the where conditions. 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-2023
BBN Solutions