标签名称:digg排行榜
sql语句:
- select top 10 i.channelid,i.infoid,i.tid,i.fname,title,diggnum from KS_digglist d inner join ks_iteminfo i on d.infoid=i.infoid where d.channelid=i.channelid order by diggnum desc
循环体:
- [loop=10]
- <li><a href="/item/show.asp?d={$Field(infoid,Num,0,2)}&m={$Field(channelid,Num,0,2)}">{$Field(title,Text,0,...,0,)}(顶:{$Field(diggnum,Num,0,2)})
- </li>
- [/loop]
调用:{SQL_digg排行榜()}
循环体自己美化吧,主要就是查询到表ks_iteminfo和ks_digglist进行关联