$this->db->select("tb_salary.* ,tb_unit.name as unit_name,tb_session.name as session_name")
->from('tb_salary as tb_salary')
->join("tb_unit as tb_unit","tb_unit.id=tb_salary.unit_id")
->join("tb_session as tb_session","tb_session.id=tb_salary.session_id")
->where('tb_salary.isDeleted',0)
->where('tb_salary.user_id',$id)
->order_by("tb_salary.id ","desc")
->group_by('tb_salary.name ');
$q=$this->db->get();
return $q->result();
Подробнее здесь: https://stackoverflow.com/questions/612 ... de-igniter
Мобильная версия