Results 1 to 1 of 1
July 3rd, 2006, 02:26 PM #1fantasy sports database
I'm creating a fantasy sports database (php & mysql)
I can have multiple leagues with multiple teams per league.
I want teams to draft and trade players - so each player can only be on one team per league. But since there's going to be multiple leagues running, that player needs to be available to leagues where no team has picked up that player yet.
How do I ensure the player is only on one team in League Alpha, but is available to any team in League Bravo?
I thought I would create a table called league_team_player that has a unique key of "LeagueIDxTeamIDxPlayerID", so if a value exists in that table of "LeagueAlphaIDxMyTeamIDxPlayerID", then that player is not availble to that team (in that league).
But I thought there's probably a better way....
ps. affilate related content..... uh.... I'm going to sell stuff on the site when it's done...
By Hectic GHC in forum Midnight Cafe'Replies: 9Last Post: February 23rd, 2009, 08:51 PM