View Single Post
  #2   IP: 218.2.67.121
Old 2015-10-10, 07:52 AM
Keshena Keshena is offline
初级会员
 
Join Date: 2006-04-15
Posts: 1
Keshena 现在声名狼藉
Default

试下这个
<?php
$w_total=$empire->fetch1("select count(*) as total from {$dbtbpre}ecms_表名 where classid=$navclassid and checked");
$total=$w_total[total];
?><span class="num">共有<?=$total?>条</span>

如是v7.2:
<?php
$w_total=$empire->fetch1("select count(*) as total from {$dbtbpre}ecms_表名 where classid=$navclassid");
$total=$w_total[total];
?><span class="num">共有<?=$total?>条</span>

如查v7.2新闻列表文章数:
<?php
$w_total=$empire->fetch1("select count(*) as total from {$dbtbpre}ecms_news where classid=$navclassid");
$total=$w_total[total];
?><span class="num">共有<?=$total?>条</span>

Last edited by Keshena : 2015-10-10 at 08:40 AM
Reply With Quote