织梦模板dedecms 调用软件下载排行的代码
作者:sdcms 日期:2023-05-29 分类:CMS教程
大部分网上提供的织梦下载排行都只能针对一个软件只有一个下载地址的情况,
如果一个软件里有多个下载地址就不行了,以下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
如果一个软件里有多个下载地址就不行了,以下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