$cquery = "SELECT COUNT(*) AS dd FROM `dede_taglist` WHERE tid = '{$this->TagInfos['id']}' AND arcrank >-1 ";$row = $this->dsql->GetOne($cquery);$this->TotalResult = $row['dd'];
1
2
3
如图
改成
$this->dsql->SetQuery("SELECT aid FROM `dede_taglist` WHERE tid = '{$this->TagInfos['id']}' AND arcrank>-1 ");$this->dsql->Execute();while($row=$this->dsql->GetArray()){$atrow = $this->dsql->GetOne("SELECT id FROM `dede_arctiny` WHERE id='{$row['aid']}' AND arcrank>-1");if(!is_array($atrow)){$this->dsql->ExecuteNoneQuery("DELETE FROM `dede_taglist` WHERE aid='{$row['aid']}' ");continue;}$idlists .= ($idlists=='' ? $row['aid'] : ','.$row['aid']);}if($idlists!=='') $this->TotalResult = $row['dd'] = count(explode(',',$idlists));