Habari\DB::get_keyvalue PHP Метод

get_keyvalue() публичный статический Метод

Returns an associative array using the first returned column as the array key and the second as the array value
public static get_keyvalue ( string $query, array $args = [] ) : array
$query string The query to execute
$args array Arguments to pass for prepared statements
Результат array An array containing the associative data $ary= DB::get_keyvalue( 'SELECT keyfield, valuefield FROM tablename');
    public static function get_keyvalue($query, $args = array())
    {
        return DB::instance()->connection->get_keyvalue($query, $args);
    }