[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
xampp
/
htdocs
/
simkeu
/
application
/
models
/
[
Home
]
File: mprogress.php
<?php class Mprogress extends CI_Model { public function __construct() { $this->load->database(); } public function get_item() { return $this->db->get('tbl_item'); } public function get_komentar() { $this->db->order_by('tanggal', 'desc'); return $this->db->get('komentar'); } public function get_komentar_where_id_item($id) { $this->db->from('komentar, tbl_item'); $this->db->where('komentar.id_item = tbl_item.id'); $this->db->where('id_item' , $id); return $this->db->get(); } public function get_komentarnya_where_id_item($id) { $this->db->from('komentar, tbl_item'); $this->db->where('komentar.id_item = tbl_item.id'); $this->db->where('id_item' , $id); $this->db->order_by('tanggal', 'desc'); return $this->db->get(); } public function create($nilai) { $this->db->insert('tbl_item',$nilai); } public function create_komentar($nilai) { $this->db->insert('komentar',$nilai); } public function get_item_id_nameitem() { $query = $this->db->query('SELECT id, item FROM tbl_item'); return $query->result(); } public function get_namaitem($id) { $this->db->where('id',$id); return $this->db->get('tbl_item'); } }