<?php
/**
	by it308.com
*/
class User_m extends CI_Model{
	public function __construct(){
		parent::__construct();
	}
	public function insert($data){
		$this->db->insert('user',$data);
		return $this->db->affected_rows();
	}
	public function getwhere($where,$value){
		$this->db->where($where,$value);
		return $this->db->get('user')->result();
	}
	public function get($where){
		$this->db->where($where);
		$res = $this->db->get('user')->result();
		//echo $this->db->last_query();
		return $res;
	}
}