Mouse Over Lines For Stats

Select a Group

array ( "( SELECT bib from $table WHERE sex='F' and dnf != 'DNF' ORDER by TIME_TO_SEC(finish) LIMIT 3) UNION ( SELECT bib from $table WHERE sex='M' and dnf != 'DNF' ORDER by TIME_TO_SEC(finish) LIMIT 3)", "Top 3 Men and Women" ), 'top_10_m' => array ("SELECT bib from $table WHERE sex='M' and dnf != 'DNF' ORDER BY TIME_TO_SEC(finish) asc LIMIT 10", "Top 10 Men"), 'top_10_w' => array ("SELECT bib from $table WHERE sex='F' and dnf != 'DNF' ORDER BY TIME_TO_SEC(finish) asc LIMIT 10", "Top 10 Women"), 'under_24' => array ("SELECT bib from $table WHERE TIME_TO_SEC(finish)-TIME_TO_SEC(start) < TIME_TO_SEC('24:00:00') and dnf = ''", "Sub 24 hour Finishers"), 'under_30' => array ("SELECT bib from $table WHERE TIME_TO_SEC(finish)-TIME_TO_SEC(start) < TIME_TO_SEC('30:00:00') and dnf = ''", "Sub 30 hour Finishers"), 'men' => array ("SELECT bib from $table WHERE sex = 'M'", "All Men"), 'women' => array ("SELECT bib from $table WHERE sex = 'F'", "All Women"), '_29m' => array ("SELECT bib from $table WHERE age < 30 AND sex='M'", "Men Under 30"), '30_39m' => array ("SELECT bib from $table WHERE age < 40 and age > 29 AND sex='M'", "Men 30-39"), '40_49m' => array ("SELECT bib from $table WHERE age < 50 and age > 39 AND sex='M'", "Men 40-49"), '50_59m' => array ("SELECT bib from $table WHERE age < 60 and age > 49 AND sex='M'", "Men 50-59"), '60_m' => array ("SELECT bib from $table WHERE age > 59 AND sex='M'", "Men 60 and Older"), '_29f' => array ("SELECT bib from $table WHERE age < 30 AND sex='F'", "Women Under 30"), '30_39f' => array ("SELECT bib from $table WHERE age < 40 and age > 29 AND sex='F'", "Women 30-39"), '40_49f' => array ("SELECT bib from $table WHERE age < 50 and age > 39 AND sex='F'", "Women 40-49"), '50_59f' => array ("SELECT bib from $table WHERE age < 60 and age > 49 AND sex='F'", "Women 50-59"), '60_f' => array ("SELECT bib from $table WHERE age > 59 AND sex='F'", "Women 60 and Older"), 'dropped' => array ("SELECT bib from $table WHERE dnf = 'DNF'", "Dropped"), 'finishers' => array ("SELECT bib from $table WHERE dnf != 'DNF'", "All Finishers"), 'first_aid' => array ("SELECT bib from $table WHERE TIME_TO_SEC(3_in) != 0 ORDER by TIME_TO_SEC(3_in) LIMIT 20", "First 20 to 2nd Aid Station"), 'all' => array ('SELECT bib from $table WHERE bib > 0', "All Runners") ); $query = $search_array[$search][0]; $title = $search_array[$search][1]; $result = mysql_query( $query ) or print mysql_error(); $ray = array(); while ( $row = mysql_fetch_row($result) ) { array_push ($ray, $row[0]); } $params['bib'] = $ray; } # if there is a 10 above and ten below race, race them: if ( $race_bib != '' ) { $query = "SELECT bib from $table WHERE TIME_TO_SEC(finish) > ( SELECT TIME_TO_SEC(finish) from $table where bib = $race_bib ) and TIME_TO_SEC(finish) != 0 ORDER BY TIME_TO_SEC(finish) LIMIT 10"; $result = mysql_query( $query ) or print mysql_error(); $ray = array(); while ( $row = mysql_fetch_row($result) ) { array_push ($ray, $row[0]); } $query = "SELECT bib from $table WHERE TIME_TO_SEC(finish) < ( SELECT TIME_TO_SEC(finish) from $table where bib = $race_bib ) and TIME_TO_SEC(finish) != 0 ORDER BY TIME_TO_SEC(finish) DESC LIMIT 10"; $result = mysql_query( $query ); // or print mysql_error(); while ( $row = mysql_fetch_row($result) ) { array_push ($ray, $row[0]); } # make sure the racer is in there.... array_push ($ray, $race_bib); $params['bib'] = $ray; $title = "Bib# $race_bib and Ten Finishing Before and After"; } if ( $title == '' ){ if ( count ($params['bib']) != 0 ) { $title = "Selected Runners"; } else { $title = "No Runners in This Category"; } } $bib_count = count($params['bib']); # kludge to sort the bibs $count2 = 0; foreach ($params['bib'] as $this_bib) { $count2 = $count2 + 1; $query_build .= "bib = $this_bib "; if ( $bib_count > $count2 ) { $query_build .= " OR "; } } $query = "SELECT bib from $table WHERE finish != 'DNF' AND (" . $query_build . ") ORDER by TIME_TO_SEC(finish) ASC"; $result = mysql_query( $query ); // or print mysql_error(); $ray = array(); while ( $row = mysql_fetch_row($result) ) { array_push ($ray, $row[0]); } # now sort the dnfers differently $query = "SELECT bib from $table WHERE finish = 'DNF' AND (" . $query_build . ") ORDER by TIME_TO_SEC(finish) DESC"; $result = mysql_query( $query ); // or print mysql_error(); while ( $row = mysql_fetch_row($result) ) { array_push ($ray, $row[0]); } $params['bib'] = $ray; # make menus ?>

A Finisher & 10 Faster&Slower


Multiple by Bib (ctl-click)


Multiple by Name(ctl-click)