phpcms如何实现自定义字段按照文章数量多少来排序?

2024-11-17 01:40:17
推荐回答(1个)
回答1:

额,用sql的话
SELECT count(catid),catid FROM `phpcms_news` GROUP BY catid ORDER BY COUNT(catid) DESC 把catid换成你的字段