Firdaus Nova
1 month ago
Like 5
Comment 10
solved.....thanks master

Master mw tanya nih ana ada 2 tabel  mahasiswa dan dosen...
Tabel dosen....
Iddosen.     nama.     Matakuliah
________________________________
1.               Brawijaya.   Aljabar linier

Tabel mahasiswa 
Id mahasiswa.   Nama.     Matakuliah
______________________________________
1                           andi.          Aljabar linier
2.                           Anwar.        Kalkulus
Mau aku tampilin di tabel nya... Si dosen yg ngajar aljabar linier
Function select_mahasiswa_bydosen_id
 Id mahasiswa  nama     matakuliah
____________________________________
1.                         Andi.       Aljabar linier

Gmna yah

Dosen_id = this->session->userdata('login_user_id);
This->db->by('idmahasiswa');
return $this->db->get_where('mahasiswa' array ('matakuliah=>$matakuliah))-> result_array();
Kok ga tampil yah....terima kasih..
Write Comment

Fakhrur+Rozi - Tabel dosen : id_dosen, nama_dosen; matakuliah : id_matakuliah, nama_matakuliah; ampu: id_ampu, id_dosen, id_matakuliah

Firdaus+Nova - Ampu apaan master

Firdaus+Nova - Intinya master cuma mw nampilin mahasiwa yg ngambil pelajaran dia aj...

Rizaldy+Setiawan+Hasanuddin - $this->db->select('a.*, b.*'); $this->db->from('mahasiswa a, dosen b'); $this->db->where('a.matakuliah=b.matakuliah'); $query = $this->db->get(); if($query->num_rows() > 0) { foreach($query->result() as $row) { $data[] = $row; } return $data; } return null;

Firdaus+Nova - Ok master Rizaldy Setiawan Hasanuddin...tak coba dl yah..

Firdaus+Nova -

Firdaus+Nova - Ni model nya master

Firdaus+Nova -

Firdaus+Nova - Ni controler nya mastet

Firdaus+Nova - Up