$dsql->SetQuery("Select tid From `dede_taglist` where arcrank<=-1"); $dsql->Execute(); $ids = ''; while($row = $dsql->GetArray()) { $tid = $row['tid']; $cquery = "Select count(*) as dd From `dede_taglist` where tid = $tid and arcrank<=-1"; $crow = $dsql->GetOne($cquery); if(!$crow['dd']) { $ids .= ( $ids=='' ? $row['tid'] : ','.$row['tid'] ); } } if($ids != '') { $addsql= " where id not in($ids) "; } if(!empty($typeid)) { if($addsql) { $addsql= " and typeid='$typeid' "; }else{ $addsql= " where typeid='$typeid'" ; } } |
版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!