利用gettotal統(tǒng)計(jì)查詢來調(diào)用帝國(guó)CMS當(dāng)前欄目縮略圖方法
當(dāng)前欄目ID
=$empire->gettotal("select?classid?as?total?from?{$dbtbpre}enewsclass?where?classid={$GLOBALS['navclassid']}?limit?1")?>
當(dāng)前欄目的縮略圖:
=$empire->gettotal("select?classimg?as?total?from?{$dbtbpre}enewsclass?where?classid={$GLOBALS['navclassid']}??limit?1")?>
當(dāng)前父欄目ID
=$empire->gettotal("select?classid?as?total?from?{$dbtbpre}enewsclass?where?classid={$class_r[$navclassid][bclassid]}?limit?1")?>
當(dāng)前父欄目的縮略圖
=$empire->gettotal("select?classimg?as?total?from?{$dbtbpre}enewsclass?where?classid={$class_r[$navclassid][bclassid]}?limit?1")?>
注釋:調(diào)用什么字段就填寫什么字段,如欄目ID:classid 、欄目圖片:classimg。注意:gettotal用count(*)時(shí)為統(tǒng)計(jì),用*時(shí)為字段;*號(hào)也可以是字段如:classid
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: 怎么利用gettotal統(tǒng)計(jì)查詢來調(diào)用帝國(guó)CMS當(dāng)前欄目縮略圖