[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
BACKUP C 19-12
/
XAMPP74
/
htdocs
/
smk
/
application
/
models
/
sms
/
[
Home
]
File: Inbox_model.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Inbox_model extends CI_Model{ private $database = 'dusms'; private $table = 'inbox'; function save($data){ $this->db->insert($this->database.'.'.$this->table, $data); } function delete($id){ $this->db->where('id', $id) ->delete($this->database.'.'.$this->table); } function update($data, $id){ $this->db->where('id', $id) ->update($this->database.'.'.$this->table, $data); } function get_inbox_by_id($id){ $this->db->from($this->database.'.'.$this->table) ->where('id', $id) ->limit(1); return $this->db->get(); } function get_all_inbox($start, $rows, $search){ $this->db->like('pengirim', $search) ->from($this->database.'.'.$this->table) ->order_by('ts', 'DESC') ->limit($rows, $start); return $this->db->get(); } function get_all_inbox_count($search){ $this->db->select('COUNT(*) AS hasil') ->like('pengirim', $search) ->from($this->database.'.'.$this->table); return $this->db->get(); } }