导航首页 » 网站优化

织梦模板dedecms 调用软件下载排行的代码

2023/03/11 12:27    魔司收录网    已浏览131次

大部分网上提供的织梦下载排行都只能针对一个软件只有一个下载地址的情况,
如果一个软件里有多个下载地址就不行了,以下sql语句可以解决这个问题:
select a.id as aid,a.title,a.shorttitle,a.litpic,d.id as did,sum(d.downloads) as downloads from dede_archives as a,dede_downloads as d where a.id = d.id and a.arcrank=0 group by d.id order by downloads desc limit 10