List:General Discussion« Previous MessageNext Message »
From:Eric Bergen Date:October 20 2004 3:39am
Subject:Re: counting rows
View as plain text  
When you get the results of the query use mysql_num_rows(res) to get
the number of groups. Or if you only want to return the number of
groups in a query use something like. select count(distinct field)
from table;


On Wed, 20 Oct 2004 03:03:47 +0200, Marco <brbromo@stripped> wrote:
> I would like to count all of the resulting rows of my query.
> But my query contains a "group by", so
> select count(*) from table group by field
> will select an individual group count for each group. Instead, I would
> like to count the number of groups.
> Thanks,
> Marco
> --
> MySQL General Mailing List
> For list archives:
> To unsubscribe:

Eric Bergen
counting rowsMarco20 Oct
  • Re: counting rowsEric Bergen20 Oct