function GetTotalArc($tid){ $dsql = new DedeSql(false); $sql = TypeGetSunID($tid,$dsql); $row = $dsql->GetOne("Select count(ID) as dd From dede_archives where {$sql}"); return $row['dd']; } |
function GetChannelArticleNum($id){ if(!$id || !is_numeric($id)) return 0; $dsql = new DedeSql(); require_once(dirname(__FILE__)。"/inc_channel_unit_functions.php"); $sql = TypeGetSunID($id,$dsql); $dsql -> SetQuery("Select count(*) as c From dede_archives where {$sql}"); $row = $dsql -> GetOne(); return $row['c']; } |
function ParseTemplet() { if(!is_array($this->dtp->CTags)) return ""; foreach($this->dtp->CTags as $tagid=>$ctag) { $tagname = $ctag->GetName(); //countclass 統(tǒng)計欄目文章數(shù)量 if( $tagname == "countclass" ){ $tid = $ctag->GetAtt("typeid"); $row = $this->dsql->GetOne("Select count(ID) as dd From dede_archives where typeid='$tid' and arcrank<>-1"); $this->dtp->Assign($tagid,$row['dd']); } |
function GetTotalArc($tid){ $dsql = new DedeSql(false); $row = $dsql->GetOne("Select count(ID) as dd From dede_archives where typeid='$tid'"); return $row['dd']; } |
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會員發(fā)布,如果侵犯了您的權(quán)益請與我們聯(lián)系,我們將在24小時內(nèi)刪除!謝謝!
轉(zhuǎn)載請注明: 織夢模板下載dedecms萬能SQL標簽使用方法教程