method fetchAll documentation in bbn\Db\Languages\Sql
Return an array of indexed array with all results of the query or empty array if there are no results.
Example
X::dump($db->fetchAll("SELECT 'surname', 'name', 'id' FROM users WHERE name = 'john'"));
/* (array)
[
[
"surname" => "White",
0 => "White",
"name" => "Michael",
1 => "Michael",
"id" => 1,
2 => 1,
],
[
"surname" => "Smith",
0 => "Smith",
"name" => "John",
1 => "John",
"id" => 2,
2 => 2,
],
]
function(string $query)
{
if ($r = $this->query(...\func_get_args())) {
return $this->fetchAllResults($r);
}
return false;
}
Return an array of indexed array with all results of the query or empty array if there are no results. 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