MySQL列数据示例:
stringone
stringthree
stringtwo
stringone
stringone
stringthree
Run Code Online (Sandbox Code Playgroud)
如何通过PHP或mysql_本身从MySQL获得以下结果?我不懂字符串内容.
stringone 3x
stringthree 2x
stringtwo 1x
Run Code Online (Sandbox Code Playgroud)
感谢您的建议和指导.
试试这个:
SELECT columnname1,count(columnname1)
FROM tablename
GROUP BY conlumnname1;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
727 次 |
| 最近记录: |