SQL statements get dedecms How many articles are there in each column of the weaving dream?

Source: Internet
Author: User

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&gt ; =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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.