您的位置:首页 > 帝国cms教程

帝国CMS统计留言数量的方法

2020-01-28 10:45:43 帝国cms教程 149

帝国CMS统计留言数量的方法。分享给大家供大家参考。具体实现方法:

帝国CMS指定模型下的留言数量代码:
 

代码:<?php 
$totalnum=(int)$_GET['totalnum']; 
$totalquery="select count(*) as total from ***_enewsgbook where bid=1 and checked=0"; 
$num=$empire->gettotal($totalquery);//取得总条数 
echo $num; 
?>
帝国CMS不指定模型留言数量代码:

代码:<?php 
$totalnum=(int)$_GET['totalnum']; 
$totalquery="select count(*) as total from ***_enewsgbook"; 
$num=$empire->gettotal($totalquery);//取得总条数 
echo $num;
?>

 

相关推荐