Jump to content

Recommended Posts

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

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?

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

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.