John Chang wrote:

In the output table I see:
I Spy  Eddie Murphy
I Spy Kelly Robinson
I Spy Owen Wilson

This discussion has taken place in the last two weeks before; what you're missing is that it doesn't matter what your output looks like in mysql; you're supposed to format it in your program. You've got the right query already, but if you want to get the data seperately and possibly more efficiently, do two queries (I'm making up the table names; I'm sure you can figure it out):

SELECT @MovieID:=ID, Name FROM Movies
-- Display Name. --
SELECT * FROM Actors LEFT JOIN MovieActors ON ActorsID = Actors.ID Where MovieID = @MovieID;
-- Loop through each result, displaying names --

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



---------------------------------------------------------------------
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



Reply via email to