{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 /]" rel="nofollow noopener noreferrer" 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天内的数据