So if there is a Video with TitleName=I Spy and the stars are Eddie Murphy, Kelly Robinson, Owen Wilson
In the output table I see:
I Spy Eddie Murphy
I Spy Kelly Robinson
I Spy Owen Wilson
I want to see something like this:
I SPY Eddie Murphy, Kelly Robinson, Owen Wilson
OR
I SPY Eddie Murphy
Kelly Robinson
Owen Wilson
Here is the select statement I tried but doesn't work.
SELECT TitleName, ActorName
FROM Titles
left JOIN ActorTitle ON Titles.TitleID = ActorTitle.TitleID
left JOIN Actors ON Titles.ActorID =Actors. ActorID
WHERE TitleName LIKE '%colname%'
ORDER BY TitleName ASC
Studios (StudioName, StudioID) Genres (GenreName, GenreID) Titles (TitleName, Details, StudioID, GenreID, BitRateID, TitleID) Actors (ActorName, ActorID) ActorTitle (TitleID, ActorID) TitleGenres (TitleID, GenreID)
2) Is there a way to optimize my tables for this kind of searches? Thank you. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php