I have two tables, GAMES and USERS set up with the following fields:
tblGAMES-->
GAME_ID (int) primary key,
P1_ID (int),
P2_ID (int),
P3_ID (int),
P4_ID (int)
tblUSERS-->
USER_ID (int) primary key,
FIRST_NAME (text),
LAST_NAME (text)
I am querying my database to print out the details of every game row. Example:
GAME_ID:1, P1:1, P2:2, P3:3, P4:4
but instead of printing out the id which is stored in tblGAMES I would like to print out the first name of each player as it appears in the corresponding row in tblUSERS. Is this doable using a single query as opposed to multiple queries?
end result-->GAME_ID:1, P1:David, P2:Paul, P3:John, P4:Bobby