In update.php, line 145, add a new function to get the season ID based on the conference ID: function getseasonid($conferenceid) { $query = 'SELECT season FROM sportsdb_conferences WHERE confid = ' . $conferenceid . ' LIMIT 1'; $result = mysql_query($query) or die("Error in query: $query"); $seasonid = mysql_result($result, 0); // Return the season ID return intval($seasonid); } In admin_files/addscore.php, line 79, replace the query and add a line to fetch the season ID: $seasonid = getseasonid($confid); $query="SELECT sportsdb_teams.teamname, sportsdb_teams.teamid, sportsdb_divs.divname FROM sportsdb_teams LEFT JOIN sportsdb_divs ON sportsdb_teams.teamdiv = sportsdb_divs.divid LEFT JOIN sportsdb_conferences ON sportsdb_divs.conference = sportsdb_conferences.confid WHERE (sportsdb_teams.active =1 AND sportsdb_conferences.season = $seasonid) OR sportsdb_teams.teamid = -1 ORDER BY conforder ASC, divorder ASC, teamname ASC"; In admin_files/editscore.php, line 203, replace the query and add a line to fetch the season ID: $seasonid = getseasonid($confid); $query2="SELECT sportsdb_teams.teamname, sportsdb_teams.teamid, sportsdb_divs.divname FROM sportsdb_teams LEFT JOIN sportsdb_divs ON sportsdb_teams.teamdiv = sportsdb_divs.divid LEFT JOIN sportsdb_conferences ON sportsdb_divs.conference = sportsdb_conferences.confid WHERE (sportsdb_teams.active =1 AND sportsdb_conferences.season = $seasonid) OR sportsdb_teams.teamid = -1 ORDER BY conforder ASC, divorder ASC, teamname ASC";