[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
software bumsil
/
APLIKASI SIMAKU
/
unb.simaku.net
/
unb.simaku.net
/
application
/
models
/
[
Home
]
File: Mbank.php
<?php //Model untuk data di BANK class Mbank extends CI_Model { public function add($in){ $this->db->insert('simakune_dbspp_antara.tblmhs', $in); } function get_mhs_by_id($id){ return $this->db->get_where('simakune_dbspp_antara.tblmhs', array('id' => $id))->row(); } function terbayar($ID){ $this->db->select('JMLTRANS'); $this->db->from('simakune_dbspp_antara.tbltransaksi'); $this->db->where('IDMHS', $ID); $query = $this->db->get(); if ($query->num_rows()>0){ $jml=0; foreach ($query->result() as $row) { $jml = $jml + $row->JMLTRANS; } return $jml; }else{ return 0; } } }