Home >CMS Tutorial >DEDECMS >How to call the number of comments and collections on the Dreamweaver list page and article page

How to call the number of comments and collections on the Dreamweaver list page and article page

藏色散人
藏色散人Original
2020-01-09 09:16:262312browse

How to call the number of comments and collections on the Dreamweaver list page and article page

#How to call the number of comments and collections on the Dreamweaver list page and article page?

number of comments and collections called on DEDECMS list page and article page

Recommended study: CMS

##1. Article Page call number of comments

{dede:field.id runphp='yes'}$dsql = new dedesql(false);$dsql -> SetQuery("Select count(id) as c from dede_feedback where aid=".@me);$row = $dsql -> getone();@me=$row['c'];{/dede:field.id} comments

2. The number of collections called by the article page

Collected: {dede:field.id runphp='yes'}$dsql = new dedesql();$dsql -> SetQuery("select count(*) as c from dede_member_stow where aid=".@me);$row = $dsql -> getone();@me=$row['c'];{/dede:field.id} times

3. Number of comments called on the list page

[field:ID runphp='yes']$dsql = new dedesql(false);$dsql -> SetQuery("Select count(id) as c from dede_feedback where aid=".@me);$row = $dsql -> getone();@me=$row['c'];[/field:ID] comments

4. List page calls collection number

is collected: [field:ID runphp='yes']$dsql = new dedesql();$dsql -> SetQuery("select count(*) as c from dede_member_stow where aid=".@me);$row = $dsql -> getone();@me=$row['c'];[/field:ID] times

The above is the detailed content of How to call the number of comments and collections on the Dreamweaver list page and article page. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn