select a.id ,COUNT(b.id) as num from phphi_category a left join phphi_article b on b.cid=a.id GROUP BY a.id order by num desc;
本文共 181 字,大约阅读时间需要 1 分钟。
select a.id ,COUNT(b.id) as num from phphi_category a left join phphi_article b on b.cid=a.id GROUP BY a.id order by num desc;
转载于:https://www.cnblogs.com/legend-song/p/3622577.html