草庐IT

johnnietheblack

全部标签

php - 如何在我的 MySQL 表的列中找到最常见的结果

我想使用PHP和MySQL查询我的用户发布的帖子表,以查找发布条目最多的人。正确的查询是什么?示例表结构:[id][UserID]1johnnietheblack2johnnietheblack3dannyrottenegg4marywhite5marywhite6johnnietheblack我想看到“johnnietheblack”是最重要的海报,“marywhite”次之,“dannyrottenegg”最少 最佳答案 类似于:SELECTCOUNT(*)AS`Rows`,UserIDFROM`postings`GROUPBY