I'm not sure about the best way to do this so here goes. First, I have retrieved from my database only certain records:
$result2 = mysql_query("SELECT * FROM results where dcode=$dname and yr=$lyr", $connection);
we'll keep it short by only listing a few records:
a b c
20 12 257
16 8 312
32 40 118
now...here's where it is getting tricky for me.
I want to display averages for a and b and a total for c. to complicate it, i also want to count the number for b that is under 10.
so my display should be something to the effect of:
a b c d
22.7 20 687 1 <- D represents one row under 10
is there an easy of doing this or am i going to have to write individual queries for each item i am trying to display?
thx
$result2 = mysql_query("SELECT * FROM results where dcode=$dname and yr=$lyr", $connection);
we'll keep it short by only listing a few records:
a b c
20 12 257
16 8 312
32 40 118
now...here's where it is getting tricky for me.
I want to display averages for a and b and a total for c. to complicate it, i also want to count the number for b that is under 10.
so my display should be something to the effect of:
a b c d
22.7 20 687 1 <- D represents one row under 10
is there an easy of doing this or am i going to have to write individual queries for each item i am trying to display?
thx