" />

织梦dedecms列表页调用好评/中立/差评的方法

shape
shape
shape
shape
shape
shape
shape
shape
织梦dedecms列表页调用好评/中立/差评的方法缩略图

列表页调用好评的代码:
{dede:field name=’id’ runphp=’yes’}
global $dsql;
$tid=@me;
$sql=”select count(dede_archives.id) as count from dede_archives,dede_feedback where dede_feedback.aid=dede_archives.id and dede_archives.typeid=$tid and dede_feedback.ftype=’
good‘”;
$row=$dsql->getOne($sql);
@me=$row[“count”];
{/dede:field/}

列表页调用中立的代码:
{dede:field name=’id’ runphp=’yes’}
global $dsql;
$tid=@me;
$sql=”select count(dede_archives.id) as count from dede_archives,dede_feedback where dede_feedback.aid=dede_archives.id and dede_archives.typeid=$tid and dede_feedback.ftype=’
feedback‘”;
$row=$dsql->getOne($sql);
@me=$row[“count”];
{/dede:field/}

列表页调用差评的代码:
{dede:field name=’id’ runphp=’yes’}
global $dsql;
$tid=@me;
$sql=”select count(dede_archives.id) as count from dede_archives,dede_feedback where dede_feedback.aid=dede_archives.id and dede_archives.typeid=$tid and dede_feedback.ftype=’
bad‘”;
$row=$dsql->getOne($sql);
@me=$row[“count”];
{/dede:field/}

发表评论