method fetch documentation in bbn\Db\Languages\Sql

Return an indexed array with the first result of the query or false if there are no results.

Example

X::dump($db->fetch("SELECT name FROM users WHERE id = 10")); /* (array) [ "name" => "john", 0 => "john", ] function(string $query) { if ($r = $this->query(...\func_get_args())) { return $r->fetch(); } return false; }

Return an indexed array with the first result of the query or false 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.