<?php 

class Login_model extends CI_Model {
	
	public function _consruct(){
		parent::_construct();
 	}


	function login($username, $password) {
		$enpassword=md5($password);
		$query = $this->db->query("SELECT * FROM users WHERE username='$username' AND password='$enpassword' AND user_type='4'");
	   if(isset($query)) {
	   $num_rows =$query->row();
	  	return $num_rows;
	  } else {
		return false; 
	  }
	}



	

}