<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}

class Login_model extends MY_Model
{

    protected $_table_name  = 'admin';
    protected $_primary_key = 'admin_id';
    protected $_order_by    = "admin_id desc";

    public function __construct()
    {
        parent::__construct();
    }
    public function check_login_info($email,$password) 
    {
        $this->db->select('*');
        $this->db->from($this->_table_name);
        $this->db->where('email',$email);
        $this->db->where('password',$password);
        $query = $this->db->get();
        $result=$query->row();
        return $result;
    }
    public function logout()
    {
        $this->session->sess_destroy();
    }
}
