织梦DEDECMS列表页和文章页调用评论数和收藏数
1.文章页调用评论数
<small>{dede:field.id runphp='yes'}$dsql = new dedesql(false);$dsql -> SetQuery("Select count(id) as c from dede_fV 8 G @ d Z -eedback where aid=".@me);$row = $F v i ] $dsql -> getone();@me=$row['c'];{/dede:field.id}</small>个评论
2.文章页调用收藏数o 0 \
被收藏:{dede:field.id runphp='yes'}$dsql = new dedesql();0 + B ) 4 / R 1 _$dsql -> SetQuery("select count(*) as c from dede_member_stowv 6 B V , l where aid=".@me);$row = $dsql -> getone();@me=$roV $ C M ? tw['c'];{/dede:fC C m e ) H 0ield.id}次
31 F Y 5.列表页调用评论数
[field:ID runphp='yes']$dsql[ M [ f / f 0 x R = newV R ` C s dedes- y P y Oql(false);$dsql -> SetQuery("Select count(id) as c from dede_feedbj 8 (aca q ik where aid=".@me);$row = $dsql -> getone();@me=$row['c'];[/field:ID]个评论
4.列表页调用收藏数
被收藏:[field:ID runphp='yes']$dsql = n1 r ? Z | L d ~ Cew dedesql();$dsql -> SetQuery("select count(*) as c from dede_member_m n \ dstow wher4 ] u g : h Y x ie aid=".@me);$row = $dsqF p L 6 (l -> getone();@me=$row['c'];[/field:ID]次