got my order to show properly. but when I went to another teams page that has no more games to play i get errors for each line in my nextgame code.
the code works great for grabbing the next game, but now realize that i need to change something if there are no more games...this is all the code and I display to the web using a .html and this <!--% %-->
thanks all
$result_schedules_scores1 = mysql_query("SELECT * FROM schedule_scores WHERE "
."(team1 = '$id' OR team2 = '$id') "
."AND season = '$sid' "
."AND team1_score = ' ' "
."AND team2_score = ' ' "
."ORDER BY date LIMIT 1");
$team11 = mysql_result($result_schedules_scores1,$i,"team1");
$team22 = mysql_result($result_schedules_scores1,$i,"team2");
$sql_team11_name = mysql_query("SELECT name FROM teams WHERE id = '$team11'");
$team11name = mysql_result($sql_team11_name,"name");
$sql_team22_name = mysql_query("SELECT name FROM teams WHERE id = '$team22'");
$team22name = mysql_result($sql_team22_name,"name");
$team11pic = mysql_result($result_schedules_scores1,0,"team1pic");
$team22pic= mysql_result($result_schedules_scores1,0,"team2pic");