$GAMETI Teams";
include "header.htm";
?>
Teams appearing in the $GAMETI Top 100 during $YEAR
";
print "Click on Column Name to sort by that column. The default sort is by team name."
?>
There are $num_teams teams listed here.";
/* Free resultset */
//mysql_free_result($result);
// Get list of teams
if($yr>2004){
$query = "SELECT NTN, Team, City, SP, Players FROM $GAMELO WHERE File LIKE $YR GROUP BY Players $order";
}else{
$query = "SELECT NTN, Team, City, SP FROM $GAMELO WHERE File LIKE $YR GROUP BY NTN $order";
}
$result = mysql_query($query) or die("List Query failed");
/* Printing results in HTML */
$z = mysql_num_fields($result);
for ($i = 0; $i < $z; $i++){
$v[$i] = mysql_field_name ($result, $i);
$v[$i]= strtoupper($v[$i]);
}
print "\n";
print "\t\n";
for ($i = 1; $i < $z; $i++){
if($v[$i]==$by){
print "\t\t\t\t | $v[$i] | \t\t | \n";
}else{
print "\t\t\t\t | $v[$i] | \t\t | \n";
}
}
print "
";
// if records present
if (mysql_num_rows($result) > 0){
// iterate through resultset -- print team names
while($row = mysql_fetch_assoc($result))
{
$NTN=urlencode($row[NTN]);
if($yr>2004){
print "\t\t\t\t | $row[Team] | \t\t | \n";
}else{
print "\t\t\t\t | $row[Team] | \t\t | \n";
}
print "\t\t\t\t | $row[City] | \t\t | \n";
print "\t\t\t\t | $row[SP] | \t\t | \n";
}
}
// if no records present
// display message
else
{
print "No team names currently available";
}
print "\t\n";
print "
\n";
/* Free resultset */
mysql_free_result($result);
/* Closing connection */
mysql_close($link);
?>