db->query("select ks.id_setting, ks.nama_tahun, kj.nama_kue as nama_kuesioner, ks.kunci, ks.aktif from kue_setting as ks join kue_jenis as kj on kj.id_jen_kue = ks.id_kue order by nama_tahun, nama_kue"); return $query; } function cek_takad(){ $query = $this->db->query("SELECT nama_tahun FROM kue_setting WHERE kunci = 'f' and aktif = 't'"); foreach ($query->result() as $row){ $takad = $row->nama_tahun; return $takad; } } }