you need tables that are linked like this
CREATE TABLE IF NOT EXISTS players {
ID BIGINT NOT NULL auto_increment,
Monacher VARCHAR(100) NOT NULL,
Email VARCHAR(100) NOT NULL,
PRIMARY KEY (ID),
INDEX Name (Name),
UNIQUE Email (Email)
}
CREATE TABLE IF NOT EXISTS teams {
ID BIGINT NOT NULL auto_increment,
TeamName VARCHAR(100) NOT NULL,
PRIMARY KEY (ID),
UNIQUE TeamName (TeamName)
}
CREATE TABLE IF NOT EXISTS positions {
ID BIGINT NOT NULL auto_increment,
Position VARCHAR(100) NOT NULL,
PRIMARY KEY(ID),
UNIQUE Position (Position)
}
CREATE TABLE IF NOT EXISTS players_to_teams {
ID BIGINT NOT NULL auto_increment,
UserID BIGINT NOT NULL,
TeamID BIGINT NOT NULL,
PositionID BIGINT NOT NULL,
String INT NOT NULL,
PRIMARY KEY (ID),
INDEX UserID (UserID),
INDEX TeamID (TeamID),
INDEX PositionID (PositionID),
INDEX String (String),
UNIQUE PlayerData (UserID,TeamID,PositionID,String)
}
there is a lot going on here. Basically you have three entiries:
Players, Teams and Positions.
You then have a manor of relating those entities by assigning a player to a team and a position which also includes giving them a string.
You can do all kinds of stuff with this database.
From this database you can get any information you need about the teams because it has been properly normalized.