method selectAllByKeys documentation in bbn\Db\Languages\Sql

Return an array indexed on the first field of the request.

The value will be an array if the request has more than two fields. Return the same value as "get_key_val".

Example

X::dump($db->selectAllByKeys("table_users", ["name","id","surname"], [["id", ">", "1"]], ["id" => "ASC"]); /* (array)[ "John" => [ "surname" => "Brown", "id" => 3 ], "Michael" => [ "surname" => "Smith", "id" => 4 ] ] function($table, array $fields = [], array $where = [], array $order = [], int $limit = 0, int $start = 0) { if ($rows = $this->rselectAll($table, $fields, $where, $order, $limit, $start)) { return X::indexByFirstVal($rows); } return $this->check() ? [] : null; }

Return an array indexed on the first field of the request. 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.