if($count)returnDB::result_first("select COUNT(*) from %t r LEFT JOIN %t t ON r.tagid=t.tagid WHERE t.tagid>0 and r.appid = %d ",array($this->_table,'app_tag',$appid));
elsereturnDB::fetch_all("SELECT t.* FROM %t r LEFT JOIN %t t ON r.tagid=t.tagid WHERE t.tagid>0 and r.appid = %d ",array($this->_table,'app_tag',$appid));
}
publicfunctionfetch_appids_by_tagid($tagid){
$appids=array();
foreach(DB::fetch_all("select appid from %t where tagid=%d",array($this->_table,$tagid))as$value){