Created
September 14, 2014 15:49
-
-
Save zhiephie/61798907964c69c5d073 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#CONTROLLER | |
function joinn() { | |
$this->load->model("model_kriteria"); | |
$data['kriteria']= $this->model_kriteria->join(); | |
$this->load->view("control_kriteria/view_data_kriteria",$data); | |
} | |
#MODEL | |
function join() { | |
$query = $this->db->query("SELECT kr.id_kriteria, (select ju.id_jurusan from tb_jurusan where kr.id_kriteria = ju.id_jurusan) FROM tb_kriteria kr group by kr.id_kriteria"); | |
return $query; | |
} | |
#VIEW | |
<th style="text-align:center">No</th> | |
<th style="text-align:center">Jurusan</th> | |
<th style="text-align:center">Mata Pelajaran</th> | |
<th style="text-align:center">Bobot Nilai</th> | |
<th style="text-align:center">Aksi</th> | |
</tr> | |
</thead> | |
<tbody> | |
<?php | |
$i = 1; | |
foreach ($k->result() as $r) { | |
?> | |
<tr> | |
<td style="text-align:center"> | |
<?php echo $i++;?></td> | |
<td style="text-align:center"> | |
<?php echo $r['id_jurusan']; ?></td> | |
<td style="text-align:center"> | |
<?php echo $r['nama_matapelajaran']; ?></td> | |
<td style="text-align:center"> | |
<?php echo $r['bobot']; ?></td> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment