select A.id,A.title,A.litpic,D.id,D.downloads from dede_archives
as A Left Join dede_downloads as D ON A.id = D.id
order by downloads DESC limit 0,25;
但是我同时还想显示软件大小,就又得查询另一个表dede_addonsoft的softsize字段,条件是上面的A.id等于该表中的aid,请问要怎么改造一下该语句?谢谢。
2 个解决方案
#1
已经解决了。
#2
select A.id,A.title,A.litpic,B.aid,B.softsize,D.id,D.downloads from dede_archives
as A Left Join dede_downloads as D ON A.id = D.id Left Join dede_addonsoft as B ON A.id = B.aid order by downloads DESC limit 0,25;
as A Left Join dede_downloads as D ON A.id = D.id Left Join dede_addonsoft as B ON A.id = B.aid order by downloads DESC limit 0,25;
#1
已经解决了。
#2
select A.id,A.title,A.litpic,B.aid,B.softsize,D.id,D.downloads from dede_archives
as A Left Join dede_downloads as D ON A.id = D.id Left Join dede_addonsoft as B ON A.id = B.aid order by downloads DESC limit 0,25;
as A Left Join dede_downloads as D ON A.id = D.id Left Join dede_addonsoft as B ON A.id = B.aid order by downloads DESC limit 0,25;