sorry for the confusion. what i'm trying to do is query sql with
$query = "select w.brewers_id, h.brewers_firstname, w.wine_class, w.wine_points, count(wine_points) from wine_entries w, homebrewer h
where w.wine_points < 18 and w.wine_points >=16
and wine_class != 'u'
and wine_class !='v'
and wine_class !='t'
and h.brewers_id = w.brewers_id
group by wine_class, brewers_id";
if (!($result = @ mysql_query ($query, $connection)))
showerror();
for ($rowCounter = 0;
$row = @ mysql_fetch_array($result);
$rowCounter++)
then php gives me all the results on many different rows repeating the brewers_id.
i need to take each of the queried results and do a count() function to add up the
count(wine_points) for each of the brewers id that belongs to a certain class from a-z to another page.
So in the end i want to display one row w/ each brewers_id(not repeating the same brewers id), display all the points count(for the id) from many different classes and have a grand total on one page.
I was thinking of using headers but that won't work b/c it only gives me 1 brewers id and 1 count(wine_points) in another page.
i hope anyone can help, and don't know if this is clear or not.
another thing that might work but don't know if mysql does this, is to have a sum for the count(wine_points) associated w/ each brewers id