I am not very proficient in SQL statements, this SQL call statement I saw in a template, special to share with you, everyone in the process of making a template can be used to get.
Display effect:
Total members: 31
Updated this month: 39 Articles
Total Articles: 244
Your Column name update article (247 articles)
{dede:sql sql= "select count (mid) as C from #@__member"} Total Members: [FIELD:C/] name {/dede:sql}{dede:sql sql= "select count (ID) as C from #@__archives WHERE from_unixtime (pubdate, '%m ') = month (Curdate ()) "} Updated this month: [FIELD:C/] Chapter {/dede:sql}{dede:sql SQL = "SELECT count (*) as C from #@__archives where Channel=1″} total article: [FIELD:C/] Chapter {/dede:sql}{dede:sql sql= ' select D.typename,d . Id,count (Da.id) as Heji from Dede_arctype D left joins 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= "/plus/list.php?tid=[field:id/]">[field:typename/] Update article </a><span> ([field:heji/])</span></span ><br />{/dede:sql}
SQL statement gets the number of DEDECMS in each column of the dream fabric