First look at the effect is as follows
Here's an easy way to do this, if you want to count how many files or software you have in each column.
The code is as follows |
Copy Code |
{dede:channel type= ' son ' currentstyle= ' <li class= ' current ' ><a href= ' ~typelink~ ' >~typename~ (~count~) </a> </li> "} |
It seems to be more advanced, oh,
Here are a few of the implementation data statistics that you might use to use the SQL tags in dedecms.
Total Comments: How many
The code is as follows |
Copy Code |
{dede:sql sql= ' select count (ID) as C from Dede_feedback '} shared comments: [FIELD:C/] Bar {/dede:sql} |
Total members: How many names
The code is as follows |
Copy Code |
{dede:sql sql= ' select count (ID) as C from Dede_member '} Total members: [FIELD:C/] name {/dede:sql} |
Total Software: How many
The code is as follows |
Copy Code |
{dede:sql sql= ' select count (ID) as C from dede_archives where channel=3″} common software: [Field:c/] {/dede:sql}
|
Count the total number of documents in a column
The code is as follows |
Copy Code |
{dede:sql sql= ' select count (ID) as C from Dede_archives where typid=1″} a total of articles: [FIELD:C//] article {/dede:sql} |
I'm not saying much more. You can customize to modify the SQL can be achieved by different columns of different data table content.