I have a bunch of event records for various event dates.
I want to write an select state that shows the following
State Count AZ 50 AR 2 AK 450 CO 75 CT 92
etc.
sorted by state of course.
How do I do this.
thanks for any help
It would go a little something like this:
$qry = "SELECT *, count(stateabbr) AS statecount ORDER BY stateabbr ASC GROUP BY stateabbr"; $result = mysql_query($qry); while ($row = mysql_fetch_array($result)): echo $row['stateabbr']." ".$row['statecount']; endwhile;