method selectOne documentation in bbn\Db\Languages\Sql
Return a single value
Example
X::dump($db->selectOne("tab_users", "name", [["id", ">", 1]], ["id" => "DESC"], 2));
(string) 'Michael'
function($table, $field = NULL, array $where = [], array $order = [], int $start = 0)
{
if ($r = $this->_exec(...$this->_add_kind($this->_set_limit_1(\func_get_args())))) {
if (method_exists($r, 'getIrow')) {
return ($a = $r->getIrow()) ? $a[0] : false;
}
$this->log('ERROR IN SELECT_ONE', $this->last_cfg, $r, $this->_add_kind($this->_set_limit_1(\func_get_args())));
}
return false;
}
Return a single value 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