hello everybody,
I have written the following loop that works realy great. What it does is allows a user to input results and this program will then loop through and allot points and an overall order.
My question is that what i need to do it combine many of these loops into one program and then output and sort the final points.
points (as you can see in the code) are allotted by an equation that relies upon the place and number of entries (which are not constants)
$run_query = "SELECT FROM ....WHERE sex = 'male' and one_time > 0 order by one_time";
$run_result = mysql_query($run_query);
$numrows = mysql_numrows($run_result);
$i=1;
while($run_row = mysql_fetch_array($run_result)){
$mydataorder = $run_row[user] + $i;
$mydatafirst = $run_row['first_name'];
$mydatalast = $run_row['last_name'];
$mydataage = $run_row['age'];
$mydataplace = $run_row['one_place'];
$mydatateam = $run_row['team'];
$mydataoneplace = $run_row['one_time'];
$mydataonepoints = ROUND(1000-($mydataorder-1)(1000/$numrows));
echo "<tr><td>".$mydataorder."</td><td>".$mydataplace."</td><td>".$mydatafirst. " " .$mydatalast."</td><td>".$mydataage."</td><td>".$mydatateam."</td><td>".$mydataoneplace."</td><td>".$mydataonepoints."</td></tr>";
$i++;
}
for example, i now have event TWO, and i change all the loops to show event two....how can i combine these two and have an OVERALL POINTS field.
-mike