method fetchColumn documentation in bbn\Db\Languages\Sql

Transposition of the original fetchColumn method, but with the query included. Return an array or false if no result

Example

X::dump($db->fetchColumn("SELECT `name`, `id` FROM users WHERE name = ?", 0, 'john')); // (string) "john" X::dump($db->fetchColumn("SELECT `name`, `email` FROM users WHERE name = ?", 1, 'john')); // (string) "john@mail.com" function($query, int $num = 0) { $args = func_get_args(); if (isset($args[1])) { unset($args[1]); } if ($r = $this->query(...$args)) { return $r->fetchColumn($num); } return false; }

Transposition of the original fetchColumn method, but with the query included. Return an array or false if no result 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.