織夢dedecms經(jīng)常用到的內(nèi)容統(tǒng)計(jì)代碼SQL調(diào)用語句:
·共有文章:多少篇
{dede:sql sql="select count(*) as c from idea_archives where channel=1"}·共有文章:[field:c /]篇{/dede:sql}
·共有圖集:多少個(gè)
{dede:sql sql="select count(*) as c from idea_archives where channel=2"}·共有圖集:[field:c /]個(gè){/dede:sql}
·共有軟件:多少個(gè)
{dede:sql sql="select count(*) as c from idea_archives where channel=3"}·共有軟件:[field:c /]個(gè){/dede:sql}
·共有評論:多少條
{dede:sql sql="select count(*) as c from idea_feedback"}·共有評論:[field:c /]條{/dede:sql}
·共有會(huì)員:多少名
{dede:sql sql="select count(mid) as c from idea_member "}·共有會(huì)員:[field:c /]名{/dede:sql}
·文章閱讀:多少人次
{dede:sql sql="select sum(click) as c from idea_archives"}文章閱讀:[field:c /]人次{/dede:sql}
·今日更新:多少篇
{dede:sql sql="SELECT count( * ) AS c FROM idea_archives WHERE pubdate & gt; UNIX_TIMESTAMP( CURDATE( ) ) "}今日更新:[field:c /]篇{/dede:sql}
總共留言:{dede:sql sql="select count(*) as cc From idea_guestbook"}[field:cc/]{/dede:sql}條
這些都是使用織夢dedecms建站的朋友經(jīng)常需要用到的數(shù)據(jù)庫調(diào)用語句,分享出來給大家學(xué)習(xí)下。