Complex selection

2002-04-22 Thread T.Thiessens
Well..complex..for me at least! I have a table containing story's All storys have one unique `storyID` I have another table where I keep track of user's favorite story's. This table has two columns `clientID`and `storyID` after a while, you could end up having the following rows in favorite

Complex selection

2002-04-22 Thread T.Thiessens
Well..complex..for me at least! I have a table containing story's All storys have one unique `storyID` I have another table where I keep track of user's favorite story's. This table has two columns `clientID`and `storyID` after a while, you could end up having the following rows in

Re: Complex selection

2002-04-22 Thread mike
JOIN is what you need. http://www.mysql.com/doc/J/O/JOIN.html Some examples: mysql SELECT * FROM table1,table2 WHERE table1.id=table2.id; mysql SELECT * FROM table1 LEFT JOIN table2 ON table1.id=table2.id; mysql SELECT * FROM table1 LEFT JOIN table2 USING (id); mysql SELECT * FROM table1