Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
下面的查询显示了 MySQL 表中所有“zip”的列表。它将具有相同“zip”的行分组。
我如何创建一个新变量来显示每个“zip”共享多少行?
$query2 = "select zip from submission GROUP BY zip order by zip asc";
添加COUNT(*)到您的选择列表:
COUNT(*)
SELECT zip, COUNT(*) FROM submission GROUP BY zip ORDER BY zip ASC