Page 1 of 1

Simply query question...

Posted: Sun Feb 15, 2009 11:51 pm
by longshoremoney
I need to do a query which will pull all the records from the table "players" and display the records by echoing.

The only issue is, when I do the query on the table "players" it is giving me all the correct data except I get the ID values from foreign tables that have relationships to "players". I think I need to use a Join statement but Im not sure how to do this...

Right now my query is this:

Code: Select all

SELECT * FROM players
This is what I get for results...
Image http://www.postimage.org/image.php?v=aV22pEbJ

Where I get the ID numbers for the fields it references to, i would like the actual value to be displayed...

Ex:

Table: teams Table: positions
ID Team ID Position
1 Bruins 1 Forward
2 Canadiens 2 Defense
3 Rangers 3 F/D
4 Red Wings 4 Goalie

So I want to see... Michael Ansaldi - Red Wings - Forward etc...

Any help would be great! Thank you :D