Welcome Guest, Not a member yet? Register   Sign In
MySQL 3 Table join question...
#3

[eluser]f244[/eluser]
Hi,

Many thanks for your reply, that's a perspective I hadn't considered - too bogged down in thinking about the query to take a step back.

Quote:artists_cds - ( id, catid, artid ) ( Where catid = foreign key to catalogue id and artid to artists id )

If I understand you correctly, the table 'artist_cds' would just have the ids of catalogue items and the relevant artist ids? eg. To use the example of catalogue item 1 having two artists and artist 1 having two catalogue items...

artists_cds

id catid artid
1 1 1
2 1 2
3 2 3
4 3 1

Am I understanding this right? If so how does that affect my query above where I'm trying to retrieve all the details for a catalogue item from the database (including multiple artists). I'm starting to get a little confused about my original MySQL query and all the joins now...!

Thanks!


Messages In This Thread
MySQL 3 Table join question... - by El Forum - 03-04-2010, 06:41 PM
MySQL 3 Table join question... - by El Forum - 03-04-2010, 08:50 PM
MySQL 3 Table join question... - by El Forum - 03-04-2010, 09:05 PM
MySQL 3 Table join question... - by El Forum - 03-05-2010, 02:47 AM
MySQL 3 Table join question... - by El Forum - 03-05-2010, 10:54 PM
MySQL 3 Table join question... - by El Forum - 03-06-2010, 02:05 PM
MySQL 3 Table join question... - by El Forum - 03-06-2010, 05:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB