欢迎各位兄弟 发布技术文章
这里的技术是共享的
$sx=$empire->fetch1("select uid,username,id from biao order by userid desc limit 1000"); $totalnum=$empire->gettotal("select count(*) as total from biao where userid='$sx[userid]'"); select uid,username from biao2 where uid='$sx[userid]' order by '$totalnum' desc limit 5 差不多以上意思,想统计表中UID一样数据,比如 username uid 表中一样uid数目 张三 1 7个 李四 2 4个 啊们 3 5个 最后排序实现 张三7个 啊们5个 李四4个
select username,count(uid) as num from biao group by username order by num (desc|asc)