建站代码网

热门标签

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

列表页调用好评的代码:
{dede:field name='id' runphp='yes'}
global $dsql;
[email protected];
$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;
[email protected];
$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;
[email protected];
$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/}