<?php  
class Zaloguj_model extends CI_Model
{
	public function __construct()
	{
		parent::__construct();
	}
	
	public function SprawdzUzytkownika()
	{
		$RezultatZapytania = $this->db->query('SELECT count(admin_id) AS IloscUzytkownikow FROM 
		blog_admin 
		WHERE 
		admin_login = "'.$this->db->escape_str($this->input->post('admin_login')).'"
		AND
		admin_haslo = "'.$this->db->escape_str(md5($this->input->post('admin_haslo'))).'"
		');
		
		return $RezultatZapytania;
	}
}
?>