![]() |
Need some help with SQL Join... Cant seem to come up witha working solution
The problem:
Table `games` has the fields `genre`, `publisher`, `developer` which contains `id`s to repsective tables `genres`, `publishers`, and `developers`. I need to create a JOIN (I believe it's an INNER because both need to have values and should have values) that merges the the ids into the respective names. Example: $game['genre'] now will represent 'Volcom', because the replace $game['genre'] pulled up the `genres` table and found Volcom to match the `id` |
Is this just a case of adding unique names? Such as like in the following example:
sql Code:
|
Well, the data inside of the tables looks like this
Code:
`games`$game['name'] = Halo 3 $game['genre'] = First Person Shooter $game['publisher'] = Microsoft $game['developer'] = Bungie Make sense? So what would the MySQL query be for that? |
the format is
select column from table1 inner join table2 on table1.column=table2.column (where table1.column = ....) the stuff in the parenthesis is optional |
| All times are GMT. The time now is 03:50 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0