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/ =================================================================== -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]