Jump to content

Recommended Posts

Hope someone can help me out.

I have two tables in mysql, one is showing all the personal information of a group of athletes (also store an indicator to show wheather they are injured or not).  I am planning to create another table to store all the players with injuries and their type of injury.

So my question is, is it possible if I want to call for a table for all the players that is with injuries (I want to show their info as well as the type of injury from the 2nd table.)

Hope someone can help me out or give me some direction on how to do it.

Or is there a easier way to do this?

Thank you.

-Ricky
Link to comment
https://forums.phpfreaks.com/topic/19137-link-between-table/
Share on other sites

So let me get this straight:

Table 1:
personid | athlete | sport | height | weight | etc

You want to add Table 2:
personid | injury | type_of_injury

Correct?

That's how it should be structured.  Then when you want to find out the people that have injuries, you can use a JOIN or a UNION between the tables to gather the information from both.  I suggest you read up on those two items on the mysql website to get a better understanding of how to join data.
Link to comment
https://forums.phpfreaks.com/topic/19137-link-between-table/#findComment-82780
Share on other sites

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.