'2008-01-01'")); $intcount = mysql_num_rows(mysql_query("SELECT date FROM gforum_Triathlons WHERE points >= 40 AND points < 100 AND valid = 1 AND date > '2008-01-01'")); $midcount = mysql_num_rows(mysql_query("SELECT date FROM gforum_Triathlons WHERE points >= 100 AND points < 180 AND valid = 1 AND date > '2008-01-01'")); $ultracount = mysql_num_rows(mysql_query("SELECT date FROM gforum_Triathlons WHERE points > 180 AND valid = 1 AND date > '2008-01-01'"));**/ /**$sqlstatelist = "SELECT gts.statetag AS statetag, gts.statelong AS statelong, COUNT(gt.uid) AS numraces FROM gforum_TriathlonsStates AS gts LEFT JOIN gforum_Triathlons AS gt ON gts.statetag = gt.statetag AND gt.date > '2008-01-01' GROUP BY gts.statetag ORDER BY gts.statetag ASC";**/ $sqlregionlist = "SELECT gtr.regionlong AS regionlong, gtr.regionid AS regionid, gtr.regionname AS regionname, gts.statetag AS statetag, gts.statelong AS statelong, COUNT(gt.uid) AS numraces FROM gforum_TriathlonsStates AS gts LEFT JOIN gforum_Triathlons AS gt ON gts.statetag = gt.statetag AND gt.date > '".$min_date."' LEFT JOIN gforum_TriathlonsRegions AS gtr ON gts.regionid = gtr.regionid GROUP BY gtr.regionlong, gts.statetag ORDER BY gtr.regionlong ASC"; //$resultstatelist = mysql_query($sqlstatelist); $resultregionlist = mysql_query($sqlregionlist); ?>

Browse Races

Sprint ($sprintcount)"); echo ("

International ($intcount)"); echo ("

Mid-Distance ($midcount)"); echo ("

Ultra ($ultracount)
"); **/ $currentregion = ''; $regioncount = ''; $tempstring = ''; $currenttag = ''; $showhide = ''; $region_dropdown = ''; $state_string = ''; //while($rowstatelist = mysql_fetch_array($resultstatelist)){ while($rowregionlist = mysql_fetch_array($resultregionlist)){ $selected_region = ''; $selected_state = ''; if ($currentregion != $rowregionlist[regionlong]) { if ($selected_item == $currentrid) { $selected_region = ' selected="seleted"'; } if ($currentregion != '') { $region_dropdown .= "$state_string"; echo ("
" . $currentregion . " (" . $regioncount . ")+
"); echo $tempstring; echo ('
'); } $currentregion = $rowregionlist[regionlong]; $currentrid = $rowregionlist[regionid]; $currenttag = $rowregionlist[regionname]; $regioncount = 0; $tempstring = ''; $state_string = ''; } if ($selected_item == $rowregionlist[statetag]) { $selected_state = ' selected="selected"'; } $state_string .= ""; $tempstring = $tempstring. "$rowregionlist[statelong] ($rowregionlist[numraces])\n"; $regioncount += $rowregionlist[numraces]; } echo ("
".$currentregion." (".$regioncount.")+
"); echo $tempstring; echo ('
'); if ( $selected_item == 'top') { $selected_region = ' selected="selected"'; } $region_dropdown .= ""; ?> Alabama ( '2008-01-01'"))); ?>)

Alaska

Alberta

Arizona ( '2008-01-01'"))); ?>)

Arkansas

British Columbia

California

Colorado

Connecticut

Delaware

Florida

Georgia

Hawaii

Idaho

Illinois

Indiana

Iowa

Kansas

Kentucky

Louisiana

Maine

Manitoba

Maryland

Massachusetts

Mississippi

Missouri

Michigan

Minnesota

Montana

Nebraska

Nevada

New Brunswick

Newfoundland

New Hampshire

New Jersey

New Mexico

New York

North Carolina

North Dakota

Nova Scotia

Ohio

Oklahoma

Ontario

Oregon

Pennsylvania

Prince Edward Island

Quebec

Rhode Island

Saskatchewan

South Carolina

South Dakota

Tennessee

Texas

Utah

Virginia

Vermont

Washington

West Virginia

Wisconsin

Wyoming

**/ ?>