东方星雨

简单网络

一个爱好网络的80后男站长。

关注我东方星雨个人微信号:476847113

您现在的位置是:首页 > 站长日志

帝国CMS调用信息按收藏数排序SQL

2018-10-16 站长 站长日志

SQL:

select a.id,a.classid,a.title,a.titlepic,a.username,a.userid,a.applynum,a.onclick,a.titleurl,b.id,b.classid,count(b.id) from phome_ecms_news as a left join phone_enewsfava as b on a.id=b.id and a.classid=b.classid where a.classid=1 and a.ispic=1 group by a.id order by count(b.id) DESC limit 5

文章评论