1

我正在使用 Ci-bonfire,当我连接多个表时,我想给出表的别名,这会使列不明确,所以如何给出表的别名

这是我的代码示例..

$select = array(
    $this->table_name . '.*',
    'bf_countries.name'
);
$join = array(
    'bf_countries'    => array(
        'condition' => 'bf_countries.country_id = ' . $this->table_name . '.country_id',
        'type'      => 'left'
    )
);

$order = array(
    "sortby"=>$this->table_name.".".$this->key,
    "order"=>"DESC"
);

$config = array(
    "req_data" => $req_data,
    "select"=>$select,
    "join"=>$join,
    "order"=>$order
);

$this->grid->initialize($config);

return $this->grid->get_result();

假设我想给出bf_countries表的别名,那么该怎么做..?

4

0 回答 0