DedeCMS模板常用的统计计数sql标签代码
所有的文章数:
{dede:sql sql="select count(*) as c from dede_archives where channel=1"}·共有文章:[field:c /]篇{/dede:sql}
所有的图集数:
{dede:sql sql="select count(*) as c from dede_archives where channel=2"}·共有图集:[field:c /]个{/dede:sql}
所有的软件数:
{dede:sql sql="select count(*) as c from dede_archives where channel=3"}·共有软件:[field:c /]个{/dede:sql}
所有的评论数:
{dede:sql sql="select count(*) as c from dede_feedback"}·共有评论:[field:c /]条{/dede:sql}
会员个数:
{dede:sql sql="select count(mid) as c from dede_member "}·共有会员:[field:c /]名{/dede:sql}
文章阅读数:
{dede:sql sql="select sum(click) as c from dede_archives"}文章阅读:[field:c /]人次{/dede:sql}
今日更新文章数:
{dede:sql sql="SELECT count( * ) AS c FROM dede_archives WHERE pubdate > UNIX_TIMESTAMP( CURDATE( ) ) "}今日更新:[field:c /]篇{/dede:sql}
总共留言条数:
{dede:sql sql="select count(*) as cc From dede_guestbook"}[field:cc/]{/dede:sql}条
{dede:sql sql="select count(*) as c from dede_archives where channel=1"}·共有文章:[field:c /]篇{/dede:sql}
所有的图集数:
{dede:sql sql="select count(*) as c from dede_archives where channel=2"}·共有图集:[field:c /]个{/dede:sql}
所有的软件数:
{dede:sql sql="select count(*) as c from dede_archives where channel=3"}·共有软件:[field:c /]个{/dede:sql}
所有的评论数:
{dede:sql sql="select count(*) as c from dede_feedback"}·共有评论:[field:c /]条{/dede:sql}
会员个数:
{dede:sql sql="select count(mid) as c from dede_member "}·共有会员:[field:c /]名{/dede:sql}
文章阅读数:
{dede:sql sql="select sum(click) as c from dede_archives"}文章阅读:[field:c /]人次{/dede:sql}
今日更新文章数:
{dede:sql sql="SELECT count( * ) AS c FROM dede_archives WHERE pubdate > UNIX_TIMESTAMP( CURDATE( ) ) "}今日更新:[field:c /]篇{/dede:sql}
总共留言条数:
{dede:sql sql="select count(*) as cc From dede_guestbook"}[field:cc/]{/dede:sql}条
上一篇:DedeCMS首页调用文章正文内容的sql万能标签语句 下一篇:DedeCMS在列表页将文章发布时间修改成"今天、昨