Re: Multiple many-to-many SELECT

2006-02-13 Thread SGreen
oops! I hit SEND before I was done. (BAD FINGERS!) SELECT * FROM movies LEFT JOIN director_movies ON director_movies.movie_id=movies.id LEFT JOIN director ON director_movies.director_id = director.id LEFT JOIN country_movies ON country_movies.movie_id=movies.id LEFT JOIN country

Re: Multiple many-to-many SELECT

2006-02-13 Thread SGreen
Peter Brawley <[EMAIL PROTECTED]> wrote on 02/12/2006 03:40:52 PM: > Jessica, > > Your first query, with inner joins, fails with the error message > > Unknown column 'movies.id' in 'on clause > > because the query inside parentheses in ... > ... > FROM movies > INNER JOIN (director INN

Re: Multiple many-to-many SELECT

2006-02-12 Thread Peter Brawley
Jessica, Your first query, with inner joins, fails with the error message Unknown column 'movies.id' in 'on clause because the query inside parentheses in ... ... FROM movies INNER JOIN (director INNER JOIN director_movies ON director_movies.director_id = director.id AND director_mov

Re: Multiple many-to-many SELECT

2006-02-12 Thread Jessica Yazbek
By request, here are the create statements for my tables: movies | CREATE TABLE `movies` ( `id` int(11) NOT NULL default '0', `catalog_description` text, `title` text, `website_url` text, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 director | CREATE TABLE `director` ( `i

Re: Multiple many-to-many SELECT

2006-02-10 Thread Jessica Yazbek
Thanks for the replies guys. I am self-taught and did do a fair amount of reading up on database design before I created my database. I'm not sure, however, that I explained myself clearly enough; the table schemas I provided were supposed to show that I have a do relating table between eac

Re: Multiple many-to-many SELECT

2006-02-10 Thread sheeri kritzer
This is where a theoretical education is great. . .Lots of us are self-taught, some of us have had theoretical stuff. I hated theoretical stuff in college and grad school, because I just wanted to sit and make something productive. I'm coming to realize that that kind of education is invaluable.

Re: Multiple many-to-many SELECT

2006-02-09 Thread Rhino
Jessica, It think your first mistake is that you are trying to implement many-to-many relationships directly. Although it is theoretically possible to do so, I've never seen anyone do it myself. I believe the normal approach is to break each many-to-many relationship into two one-to-many relat