[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
xampp
/
htdocs
/
simkeu
/
application
/
models
/
[
Home
]
File: msoal.php
<?php //model data pegawai untuk data kepangkatan class Msoal extends CI_Model { public function update($id,$in){ $this->db->where('id_soal', $id); $this->db->update('tbl_soal', $in); } public function add($in){ $this->db->insert('tbl_soal', $in); } public function add_soal($in){ $this->db->insert('tbl_soal_tipe', $in); } public function del($id){ $this->db->delete('tbl_soal', array('id_soal' => $id)); } function show(){ return $this->db->get('tbl_soal'); } function show_tipe(){ return $this->db->get('tbl_soal_tipe'); } function show_tipe_by_kode($kode){ return $this->db->get_where('tbl_soal_tipe',array('kode'=>$kode)); } function show_by_tipe($t){ $this->db->where('tipe',$t); $this->db->order_by('soal'); $this->db->order_by('tahun'); return $this->db->get('tbl_soal'); } function show_by_id($id){ $this->db->where('id_soal',$id); return $this->db->get('tbl_soal'); } }