Darkmatter5 Posted January 13, 2009 Share Posted January 13, 2009 Tables game_collections game_idmember_idsystem_id 4226 games game_idtitle 4Fallout 3 systems system_idname 6Xbox 360 The query: SELECT games.title, systems.name FROM game_collections INNER JOIN game_collections ON game_collections.game_id=games.game_id INNER JOIN games ON games.game_id=game_collections.game_id INNER JOIN game_collections ON game_collections.system_id=systems.system_id INNER JOIN systems ON systems.system_id=game_collections.system_id WHERE game_collections.member_id=4 Why is this query giving me a "1066 - Not unique table/alias: 'game_collections'" error? I'm wanting to get games.titlesystems.name Fallout 3Xbox 360 Quote Link to comment https://forums.phpfreaks.com/topic/140731-what-is-wrong-with-this-query-and-table-setup/ Share on other sites More sharing options...
xtopolis Posted January 13, 2009 Share Posted January 13, 2009 Try this.. I had the where clause in there, but it didn't give me the same result.. you have member_id instead of game_id I think SELECT gc.member_id,g.title, s.name FROM games g JOIN game_collections gc USING(game_id) JOIN systems s USING(system_id) WHERE g.game_id = 4 If you're going off member_id, the member_id is 22 Quote Link to comment https://forums.phpfreaks.com/topic/140731-what-is-wrong-with-this-query-and-table-setup/#findComment-736576 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.