帝國CMS 當前欄目一共多少篇文章用什么調用
時間:2023-01-04 來源: 作者: 我要糾錯
帝國CMS 當前欄目一共多少篇文章用什么調用
方法一:
[totaldata]$GLOBALS[navclassid],0,0[/totaldata]
方法二:
<?php
$classid=$GLOBALS[navclassid]; //獲取當前欄目ID
$r=$empire->fetch1("select count(*) as total from {$dbtbpre}ecms_news where classid='$classid'");
echo $r['total'];
?>
方法一:
[totaldata]$GLOBALS[navclassid],0,0[/totaldata]
方法二:
<?php
$classid=$GLOBALS[navclassid]; //獲取當前欄目ID
$r=$empire->fetch1("select count(*) as total from {$dbtbpre}ecms_news where classid='$classid'");
echo $r['total'];
?>