как использовать таблицу соединений с одинаковым в codeigniter, а также с несколькими столбцами в подобном.
$ search_input = $ this-> input-> get ('search_input', true);
if($search_input!=''){
$this->db->like('block.name','building.name' ,$search_input);
}
$tempdb = clone $this->db;
$total_row= $tempdb->from('block')->count_all_results();
$this->db->limit($perpage, $page);
$this->db->order_by("block.id", "desc");
$this->db->join('building','building.id=block.building_name');
$result = $this->db->select('block.id,block.name,building.name as building_name')->get('block')->result_array();
$data=array();
$data['block_data'] = $result;