how do I echo this statement to the browser?

From: Date: Sat, 21 Sep 2002 05:18:34 +0000
Subject: how do I echo this statement to the browser?
Groups: php.db 
Request: Send a blank email to php-db+get-21885@lists.php.net to get a copy of this message
I want to get the first name, last name, total row count, and total time a name appears in the database. Something like this - select f_name, l_name, count(*) as 'Total Kids', count distinct l_name from kids group by l_name it doesn't work of course, the count distinct l_name part is completely wrong. The database has kids names in it appearing multiple times, whence the need for distinct, I want the total number of times it appears though. Plus, how do I echo the number for 'Total Kids' on the browser? I don't have a column heading to reference like with f_name and l_name. I s'pose this is clear as mud. Thanks for any help you all can provide, Chip

« previous php.db (#21885) next »