commitall

This commit is contained in:
Sampanna Rimal
2024-07-10 18:28:19 +05:45
parent 140abda4e6
commit 9cd05ef3cb
15723 changed files with 4818733 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
class MUsers extends CI_Model{
function addUser($input){
$this->db->insert('tbl_users',$input);
}
function updateUser($input,$id){
$this->db->where('user_id',$id);
$this->db->update('tbl_users',$input);
}
function getUsers($id=''){
if ($id!=''){
$this->db->where('user_id',$id);
}
$this->db->where('status', 1);
$this->db->or_where('status', 2);
$result=$this->db->get('tbl_users');
if ($id!=''){
return $result->row();
}
return $result->result();
}
function getUserById($id){
$this->db->where('user_id',$id);
return $this->db->get('tbl_users')->row();
}
function deleteuser($id){
$table="tbl_users";
$this->db->where('user_id',$id);
$input['status']=0;
$this->db->update($table,$input);
}
}