php - Showing how many rows are grouped into the same field -


the query below shows list of "zip"s in mysql table. groups rows have same "zip".

how create new variable shows how many rows share each "zip"?

$query2 = "select zip submission group zip     order zip asc";   

add count(*) select list:

select zip, count(*) submission group zip order zip asc 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -