Need help quickly. I have run into a problem in mysql with three tables. Table names are as follows:
Games
Scores
Teams
Fields in Games:
game_id
game_host
game_guest
game_date
schedule_id
Fields in Scores:
unique_id
game_id
host_score
guest_score
game_played
Fields in Teams:
team_id
team_name
Ok here is what i want to do. I have two team ids stored in the games field as game_host and game_guest. These are ints so it won't mean anything when i want to display it to the users who want to see the actual football team names which are stored in team_name. I need to select all the info from all three tables where the entry in scores is related to the entry in games by the game_id. Also, in that same query i need to get the two team names from the teams table but i have to reference it by the game_host id and game_guest id. So base on those two numbers which are stored in the games table i need to get the two actual team names from the teams table. Like for example Dallas Cowboys have the id assigned to it 3 and the Green bay Packers has id of 6. These numbers are in the game_host and game_guest, so how do i get the team names and everything all in one query. Thanks for the help.
Note if your sql query you send me does what i need it to do i would be more then happy to send you $5 using paypal once i am done with the project.