{dede:sql sql="select a.id as aid,a.typeid,a.title,a.pubdate,d.id as did,d.downloads from mo_archives as a,mo_downloads as d where a.id = d.id and a.arcrank=0 and a.typeid!= 15 and a.typeid != 44 and (UNIX_TIMESTAMP()-a.pubdate)/3600/24 BETWEEN 0 AND 15 order by d.downloads desc limit 0,10;"} <li><a title="[field:title /]" href="[field:aid function=GetinfoUrl(@me,10) /]">[field:title function='cn_substr(@me,26)'/]</a> -下载数:<font color='red'>[field:downloads/]</font></li> {/dede:sql} |
这段代码的作用是条用除了栏目ID为15和44以外的所有栏目,按下载次数排列。调用10个
(UNIX_TIMESTAMP()-a.pubdate)/3600/24 BETWEEN 0 AND 15
这个是调用15天内的数据
function=GetinfoUrl(@me,10)
这个函数是写来用sql标签传值获得当前文档的静态地址的
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!