Jump to content

Recommended Posts

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

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.