1

I am using Ci-bonfire and I want to give alias name of table when I have join multiple table at that time it will give column ambiguous so how to give alias name of table

Here is my code example..

$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();

Suppose I want to give alias name of bf_countries table so what to do for that..?

Codebrekers
  • 754
  • 1
  • 11
  • 29

0 Answers0