<?php
defined('BASEPATH') or exit('No direct script access allowed');

class Common_model extends CI_Model
{
    public function check($data){
        $result=$this->db->select('*')->where('name',$data['name'])->where('pass',$data['pass'])->get('login')->row();
        if(!empty($result)){
            return true;
        }else{
            return false;
        }
        // echo $this->db->lastquery();die();
    }
    function Adminauthentic($uname,$pwd)
	{
		$this->db->select('*');
		$this->db->where('username',$uname);
		$this->db->where('password',$pwd);
		$query = $this->db->get('users');
		return $query;
	}
}