RE: query and count
| From: | Peter Westergaard | Date: | Wed, 09 Jan 2002 15:10:24 +0000 |
| Subject: | RE: query and count | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-15563@lists.php.net to get a copy of this message | ||
It seems like what you're looking for is first to do a "SELECT DISTINCT
.." to find all the unique topic names in the system.
This, in your case, would present you with Billie, Bill, Bret, ... etc.
Then, in a loop as you traverse this result, create a query for the
count of each of these specifically.
That's how I would approach it. Don't forget to index your database
based on the topic names, if it has very many records.
Cheers,
-- Peter
===================================================================
EASY and FREE access to your email anywhere: http://Mailreader.com/
===================================================================