I have 4 tables and this query
SELECT tag.id, title
FROM tag
LEFT JOIN tag_map ON ( tag.id = tag_map.tag_id )
LEFT JOIN post ON ( post.id = post_id )
LEFT JOIN
You need to specify which table you want title
to come from. Taking a guess that title will be in game
you would need to specify game.title
.
If I were you I'd start looking into splitting this down a bit using temporary tables. Although theres nothing wrong with 4 joins it does tend to start getting confusing.
Example temp table:
CREATE TABLE #Yaks (
YakID int,
YakName char(30) )
In your scenario you would create a temp table and then fill it with an INSERT
and UPDATE
based on individual joins so at the end all you have to do is SELECT * FROM @temptable