Hi all, is there function in mysql or combination of functions that i can count how many rows are associated with each distinct field from mysql? Mabey something similiar to num rows affected()
Lets say i do a query like this:
$query = "SELECT distinct catagory from wiphone where city='$city'";
The database has 50000 records and 4 distinct cities:
Racine
Franklin
Franksville
Burlington
Is there someway to find the ammount of records selected for each city? so like:
Racine (20,000)
Franklin (25,000)
Franksville (3,000)
Burlington (2,000)
Thanks for looking!