Jump to content

[SOLVED] can this be solved with a Join?


yatzr

Recommended Posts

I've got two tables, table a and table b.

Table a has two fields, personA and personB.  Table b has two fields, personName and personID.  personA and personB are numbers that correspond to personID.  personName is the name associated with that ID.  It's set up this way so that different people (identified by personID) can have the same name.

 

What I need is to somehow join the two tables to get personA, personA's personName, personB, and personB's personName.  I just started looking at doing a Join, but I don't see how I could get one to work for this.  Does anyone have a good idea on how to accomplish this?  Thanks

Link to comment
https://forums.phpfreaks.com/topic/70940-solved-can-this-be-solved-with-a-join/
Share on other sites

table a keeps track of matches between two people.  There's more columns in that table, but only the IDs are important here.  I want to display the matches, and I have the IDs, now I just need to turn those IDs into names.  The IDs and Names are already stored in a separate table...table b.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.