内容页调用代码(记得更改数据表的前缀):
1
2
{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}
首页、列表页调用代码(用于list、artlist标签中)
1
2
[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]
<!--列表页调用收藏数-->