Moved to PHP folder
This commit is contained in:
30
php/application/models/Admin_model.php
Normal file
30
php/application/models/Admin_model.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
class Admin_model extends CI_model
|
||||
{
|
||||
|
||||
function login_valid($username,$password)
|
||||
{
|
||||
$this->db->from('tbl_usermaster');
|
||||
$this->db->where('user_name',$username);
|
||||
$this->db->where('user_password',$password);
|
||||
$this->db->where('user_status','active');
|
||||
if($query=$this->db->get())
|
||||
{
|
||||
return $query->row_array();
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function totalrows($tablename='',$fields='')
|
||||
{
|
||||
$this->db->select($fields);
|
||||
$this->db->from($tablename);
|
||||
$query = $this->db->get();
|
||||
$responce = $query->num_rows();
|
||||
return $responce;
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user