let me try to explain as English is not our native language
we've a test spread over 5 divisions
each division is one form/php file
the results of each form are written to db, on one row, one row/email
of course the users are interessed in their results
so we give them the results again spread over 5 divisions and 5 php scripts
the results are not written to the db but are calculated with php
at the end we give a totalresult
but after the totalresult we also want to compare the totalresult of that individual user against the totalresults from all the users within the same sector
sector is of course one of the fields in the db
now everything works fine except that last thing
we're puzzled here, how does one says to php
go through the db, every time where you find the same sector as from totalresult.php, calculate the result (and this has to be done in php as the calculated results are not written to db) and than make the average of all the calculated results, and the number of results is equal to the mysql_num_rows result
any help will be greatly appreciated