<?php 
class Search_Model extends Model{
	function __construct(){
		parent::__construct();
	}
	function keywordsSearch($keyWords){
		$this->db->where("keywords",$keyWords);
		return $this->db->get("hot_tags");
	}
	function addSearch($insert){
		return $this->db->insert("hot_tags",$insert);
	}
	function updateKeywordsTimes($keywords,$update){
		return $this->db->where("keywords",$keywords)->update("hot_tags",$update);
	}
	function search($condtion){
		$keywords	=	"%".$condtion['title']."%";
		unset($condtion['title']);
		return $this->db->like("title",$keywords)->where($condtion)->get("search_cache");
	}
}