69 ORDER BY ".$clueSQL." ASC LIMIT 0,1"; // Picks the highest ranking time for that clue $result = mysql_query($query); $highest = mysql_fetch_assoc($result); if ($highest[$clueSQL] == $endtime ) {$bonuspoint = round($points[$cluecheck]/4);}; // Checks to see if player is first one to log a score if (substr($rn,0,1) == 'b') { $bonuspoint = round($points[$cluecheck]); $rn="0";} else { $cluepoint=round($points[$cluecheck]); $roundtot=$uline["round".$rn] + $cluepoint;} $markedclue = $uline[$clueSQL]; // already saved clue time? if ($markedclue > $cluetime) { for ( $counter = 1; $counter <= 4; $counter += 1) { $roundcount[$counter] = $uline["round" . $counter]; } $roundcount[$roundnumber[$cluecheck]] = $roundtot; sort($roundcount); $bestrounds = $roundcount[1] + $roundcount[2] + $roundcount[3]; // Total Time for best three rounds $bonustot = $uline["bonus"] + $bonuspoint; $overalltotal=$bonustot+$bestrounds; $query = "UPDATE users SET $clueSQL='$cluetime', round$rn='$roundtot', bonus='$bonustot', bestround='$bestrounds', total='$overalltotal' where id='$lineid'"; echo ($query); //$result = mysql_query($query); // Saves TotalTime to table } } } } ?>