根据字段A出现的次数进行排序
select * from table a left join
(select count(字段A) as cs,字段A from table WHERE userid = 11 group by 字段A ) b
on a.字段A=b.字段A WHERE userid = 11 order by b.cs desc
根据字段A出现的次数进行排序
select * from table a left join
(select count(字段A) as cs,字段A from table WHERE userid = 11 group by 字段A ) b
on a.字段A=b.字段A WHERE userid = 11 order by b.cs desc
上一篇: layui弹出层根据传递值打开指定的内容
下一篇: layui弹出层设置大小自适应