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