第一种 普通灵动标签调用
1、 用名称的调用 tagname==$bqr['tagname']?>
[e:loop={"select * from [!db.pre!]enewstags order by tagid",0,24,0}]
e/tags/?tagname==$bqr['tagname']?>' class='tag-link-=$bqr['tagid']?>' title='=$bqr[num]?>个话题' style='font-size: 9pt;' target="_blank">=$bqr['tagname']?>(=$bqr[num]?>)[/e:loop]
或
[e:loop={"select * from [!db.pre!]enewstags order by num DESC limit 20",0,24,0}]
echo '
'.$bqr['tagname'].'('.$bqr['num'].')';
?>
[/e:loop]
注释:[e:loop={"select * from [!db.pre!]enewstags order by tagid",0,24,0}] sal查询tag
=$public_r[newsurl]?>e/tags/?tagname==$bqr['tagname']?> 即 http://127.0.0.1/e/tag/?tagname=tag名称
=$bqr['tagid']?> tag的id
=$bqr[num]?> 如:关于"美女"的tag词有多少个,即统计tag相关数
=$bqr['tagname']?> tag名称:如"美女"
2 用id的调用 tagid==$bqr['tagid']?> 注释:不能用--用tagid做url地址不行
[e:loop={"select * from [!db.pre!]enewstags order by tagid",0,24,0}]
=$bqr['tagname']?>[/e:loop]
第二种 灵动标签+php输出式
[e:loop={"select * from [!db.pre!]enewstags order by num DESC limit 20",0,24,0}]
echo '
'.$bqr['tagname'].'('.$bqr['num'].')';
?>
[/e:loop]
------------------------------------------------------------------------------------------
注意:如果想调用几条 添加limit 20 调用20条
如:
1、按ID调用(新的靠前)
[e:loop={"select * from [!db.pre!]enewstags order by tagid limit 20",45,24,0}] tagid后加limit 20
2、按数量调用(信息数多的靠前)
[e:loop={"select * from [!db.pre!]enewstags order by num DESC limit 20",0,24,0}] num DESC后加limit 20