Apophenia Overload Posted January 19, 2011 Share Posted January 19, 2011 Okay, so have a form to input information about a football player, with a field that a person would enter in all of the teams that the player has been on. The idea is that records of these players will be used to generate an index of teams, and team pages. The team pages would then display records of all players who have once been on the team at some point. That's how it works in abstract. I'm not exactly sure how to handle the field; I'm thinking of having the teams be comma separated when the user inputs them. However, I'm more concerned about how to handle the backend, in the database itself. If each player has multiple teams associated with them, how should I store the teams value in the table for players? At the moment, since the form is about a single player, the main table I'm working with is the players table. However, I think I may need an additional table for teams. Each row on this team table wouldn't consist of much, just an id, and then a list of players. However, how would I then handle that list of players? Any suggestions as to how to deal with this situation? Is there a better solution? Quote Link to comment https://forums.phpfreaks.com/topic/224925-need-help-with-my-schema-how-to-deal-with-lists/ Share on other sites More sharing options...
Apophenia Overload Posted January 19, 2011 Author Share Posted January 19, 2011 Okay, I just went with a many-to-many relationship. Quote Link to comment https://forums.phpfreaks.com/topic/224925-need-help-with-my-schema-how-to-deal-with-lists/#findComment-1161785 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.