SEO营销探讨

DEDECMS V5.7 常用统计SQL标签汇总

·共有文章:** 篇 
{dede:sql sql="select count(ID) as c from dede_archives where channel=1"}·共有文章:[field:c /]篇{/dede:sql}

·共有图集:** 个 
{dede:sql sql="select count(ID) as c from dede_archives where channel=2"}·共有图集:[field:c /]个{/dede:sql}

·共有软件:** 个 
{dede:sql sql="select count(ID) as c from dede_archives where channel=3"}·共有软件:[field:c /]个{/dede:sql}

·共有评论:**条 
{dede:sql sql="select count(ID) as c from dede_feedback"}·共有评论:[field:c /]条{/dede:sql}

·共有会员:**名 
{dede:sql sql="select count(*) 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 dede2_addoninfos "}·共有信息:[field:c /]条{/dede:sql}


{dede:sql sql="select count(mid) as m from dede2_member "}·共有会员:[field:m /]名{/dede:sql}
{dede:sql sql="select count(id) as c from dede2_ask "}·共有问答:[field:c /]个{/dede:sql}

{dede:sql sql="SELECT count(*) AS c FROM dede_archives WHERE pubdate > UNIX_TIMESTAMP(CURDATE())"}
  <li class="count">今日更新:<span>[field:c/]</span> 篇</li>
  {/dede:sql}
  {dede:sql sql="Select count(ID) as c From dede_archives WHERE FROM_UNIXTIME(pubdate,'%m')=month(curdate())"}
  <li class="count">当月更新:<span>[field:c/]</span> 篇</li>
  {/dede:sql}
    {dede:sql sql="select count(*) as c from dede_archives}
  <li class="count">共有文章:<span>[field:c/]</span> 篇</li>
  {/dede:sql}
  {dede:sql sql="select sum(click) as c from dede_archives"} 
  <li class="count">总共阅读:<span>[field:c/]</span> 人次</li>
  {/dede:sql}
  {dede:sql sql="select count(mid) as c from dede_member "}
  <li class="count">共有会员:<span>[field:c/]</span> 名</li>
  {/dede:sql}

还可以指定栏目ID,例如:
    {dede:sql sql="select count(*) as c from dede_archives where channel in(1,2,3,5,6,9)"}
  <li class="count">共有文章:<span>[field:c/]</span> 篇</li>
  {/dede:sql}
    {dede:sql sql="select count(*) as c from dede_archives where typeid=栏目ID"}
  <li class="count">共有文章:<span>[field:c/]</span> 篇</li>
  {/dede:sql}


评论
回到首页
© SEO营销探讨 | Powered by LOFTER