db->table('PEGAWAI'); $builder->select('PEGAWAI.*,DIM_KANTOR.TP_KANTOR,DIM_KANTOR.KD_KANWIL'); $builder->join('DIM_KANTOR', 'PEGAWAI.KD_KANTOR = DIM_KANTOR.KD_KANTOR'); $builder->where('PEGAWAI.NIP9', $username); return $builder->get(); /* $query = $this->db->query("SELECT A.*,B.TP_KANTOR,B.KD_KANWIL FROM PEGAWAI A LEFT JOIN DIM_KANTOR B ON A.KD_KANTOR = B.KD_KANTOR WHERE A.NIP9 = '" . $username . "'"); return $query; */ } }