|
//选择
public function select($typename=0,$id = 0,$shopid = 0,$cateid = 0,$page = 0,$page_count = 20){
if($id>0){
$this->db->where("id",$id);
}
if($shopid>0){
$this->db->where("shopid",$shopid);
}
if($cateid>0){
$this->db->where("cateid",$cateid);
}
if($typename){
$this->db->where("typename",$typename);
}
if($page>0){
$this->db->limit($page*$page_count,($page-1)* $page_count);
}
$query = $this->db->get('activity');
return $query->result();
|
|