Re: counting categories

From: Date: Mon, 29 Oct 2001 02:06:18 +0000
Subject: Re: counting categories
Groups: php.db 
Request: Send a blank email to php-db+get-13791@lists.php.net to get a copy of this message
Hi, Depending on the database you are selecting from you could do it in one select like this: select category, count(*) from $table group by category order by category; - Frank > How would you get the count of each category? > > Like this - http://www.scriptsearch.com > > Would you have to run a different select for each > one? or would you do something like "select category > from $table " and then count all of the matches for > each category "perl" "php" "asp" > > thanks much, > Josh > > __________________________________________________ > Do You Yahoo!? > Make a great connection at Yahoo! Personals. > http://personals.yahoo.com > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.db (#13791) next »