下面是代码在前台页面中的显示效果:
共有会员:72 名
本月更新:72 篇
共有文章:7272 篇
SQL语句如下:
{dede:sql sql="select count(mid) as c from dede_member "}共有会员:[field:c /] 名{/dede:sql}
{dede:sql sql="SELECT count( ID ) AS c FROM dede_archives WHERE FROM_UNIXTIME( pubdate, '%m' ) = month(curdate( )) "} 本月更新:[field:c /] 篇{/dede:sql}
{dede:sql sql="select count(*) as c from dede_archives where channel=1"}共有文章:[field:c /] 篇{/dede:sql}
{dede:sql sql='SELECT d.typename,d.id,count(da.id) as heji FROM dede_arctype d left join dede_archives da on da.typeid=d.id where d.reid=0 and da.arcrank>=0 group by d.typename order by heji desc limit 0,8;'}<span><a href=http://www.dede58.com/"/plus/list.php?tid=[field:id/]">[field:typename/]更新文章</a><span>([field:heji/]篇)</span></span><br />
{/dede:sql}
希望大家能用得上。