def team_id(conn, team):
    """Returns the id of the team name. Or -1 if no team exists"""
    c = conn.cursor()
    c.execute('SELECT id FROM teams WHERE name LIKE ?', (team,))
    team_id = c.fetchone()
    return team_id[0] if team_id else -1