织梦调用站信息标签大全 当天当月更新数量

92建站   2021-08-19   收藏本文

本文介绍了织梦dedecms调用站信息标签大全,也就是当天当月之类的文章更新数量,还有比如共有多少文章,总共多少人阅读,以及指定栏目有多少文章,之类的功能。一起来看看吧。

{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}

展开