| Server IP : 103.48.194.25 / Your IP : 216.73.217.33 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 8.2.20 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/ngoaingusonganh.com-bk/public_html/site/models/ |
Upload File : |
<?
class customer_model extends CI_Model
{
function __construct()
{
parent::__construct();
}
function get_all($num=20,$start=0)
{
$this->db->where('bl_active',1) ;
$query = $this->db->get('customer', $num, $start) ;
return $query->result() ;
}
function count_all()
{
$this->db->where('bl_active',1) ;
$query = $this->db->get('customer') ;
return $query->num_rows() ;
}
function get_id($id)
{
$this->db->where('id',$id) ;
$this->db->where('bl_active',1) ;
$query = $this->db->get('customer', $num, $start) ;
return $query->row() ;
}
function chkemail($cusmail)
{
$this->db->where('bl_active',1) ;
$this->db->where('cusmail',$cusmail) ;
$query = $this->db->get('customer') ;
return $query->row() ;
}
function save($data, $id=0)
{
if($this->db->insert('customer', $data))
return $this->db->insert_id() ;
else
return false;
}
}
?>