[SOLVED] PHP / SQL count value
Posted: Tue May 01, 2007 7:17 am
a table in my database looks like this:
School - Year - Assessment 1 - Assessment 2
name1 - 5 - 200 - 300
name1 - 6 - 250 - 350
name2 - 5 - 190 - 300
name2 - 8 - 198 - 321
name2 - 7 - 210 - 300
with the rows above results for different years of a same school
How can I count ALL the results for the first and second assessment so it will be displayed as
name1 - 450 - 650
name2 - 598 - 921
So it counts all the results for assessment 1 and two and gives it back as an int instead of displaying all the resuls seperatly...
hope this makes sense?
School - Year - Assessment 1 - Assessment 2
name1 - 5 - 200 - 300
name1 - 6 - 250 - 350
name2 - 5 - 190 - 300
name2 - 8 - 198 - 321
name2 - 7 - 210 - 300
with the rows above results for different years of a same school
How can I count ALL the results for the first and second assessment so it will be displayed as
name1 - 450 - 650
name2 - 598 - 921
So it counts all the results for assessment 1 and two and gives it back as an int instead of displaying all the resuls seperatly...
hope this makes sense?