The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Retrieving individual COUNT records

I am trying to show the count of specific records from one query using the following.

"SELECT area, COUNT(*) FROM table GROUP BY area ORDER BY area".

I can do this in a list using a loop with an example of results

area1(20)
area2(13)
area3(34)

but is it possible to retrieve the count of individual areas using the query above or do I have to write separate queries for each area. The aim is to have each area of a map show their number of records.

but is it possible to retrieve the count of individual areas using the query above or do I have to write separate queries for each area. The aim is to have each area of a map show their number of records.

your example shows three areas, with counts for each, and that's great, so why would you want to write separate queries for each area?

It is retrieving the individual areas from the query with their count that I want to do, so that I can make up the map. For instance how would I select just the record for area2(13) without changing the script? Am I making sense?