saeed_violinist Posted May 14, 2007 Share Posted May 14, 2007 Dear Friends, I have a table named "team" for storing a football team members in each row of table, something that I cant manage cause I dont know how to put 11 member detail in just 1 row (as 1 record or ID)... here is the situtation : table name = team culomns = names, ages, foot(select from right or left) I want to insert whole team in 1 ROW of table... can anyone help me for best way to do this? someone said I can insert each columns use EXPLODE feature... but I need a complete guide for doing this. I hope that you all can understand my dilemna. Any help will be greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/51321-multiple-values-in-one-field-and-one-row/ Share on other sites More sharing options...
Wildbug Posted May 14, 2007 Share Posted May 14, 2007 Create another table for team members and use a team id or to associate them with the team information. Link to comment https://forums.phpfreaks.com/topic/51321-multiple-values-in-one-field-and-one-row/#findComment-253067 Share on other sites More sharing options...
saeed_violinist Posted May 15, 2007 Author Share Posted May 15, 2007 thanks, but the problem is I dont know how to connect to tables with eachother, I mean if I have two tables by name of "teams" and "players" as you know a team has 11 players, and heres go the situtation : tables -> teams, players teams -> id,name,coach players -> id,names,foot now how can I match players with their own team? if I insert each player details in one ROW, I will have 11 id for players and 1 id for team name...but how to match id's? Link to comment https://forums.phpfreaks.com/topic/51321-multiple-values-in-one-field-and-one-row/#findComment-253358 Share on other sites More sharing options...
bubblegum.anarchy Posted May 15, 2007 Share Posted May 15, 2007 Use a direct link (foreign key): player.id player.name player.team_id :: identifies which team the player record is associated to player.foot team.id team.name team.coach A player is linked to a team via player.team_id = team.id Link to comment https://forums.phpfreaks.com/topic/51321-multiple-values-in-one-field-and-one-row/#findComment-253487 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.