At 01:57 PM 6/06/2001, you wrote:
Hi all,
I have three tables in my (mysql) database:
videos - ID, title, description, etc..
links - ID, videoID, actorID
actors - ID, name, dateofbirth, gender, etc...
what i need to do is return a particular video and all it's staring actors
with just one
Simon Kimber pressed the little lettered thingies in this order...
Hi all,
I have three tables in my (mysql) database:
videos - ID, title, description, etc..
links - ID, videoID, actorID
actors - ID, name, dateofbirth, gender, etc...
You need to be able to tie at least one field from
Something like:
SELECT name, title, description from videos, actors, links where
actors.ID = links.ID and videos.ID=videoID, and videos.ID = 20; ?
But in just want one row? You could return all the names in one row (I
think) using MySQL (I assume?) string functions... I have a funny
feeling
SELECT video.id, video.title, video.description, actor.name
FROM ( video INNER JOIN link ON link.videoID = video.id )
JOIN actor ON actor.id = link.actorID
WHERE video.title LIKE $searchstr
What you'll get is one query returning a bunch of rows, one for each actor.
Then concatenate the actors
Christopher Wrote...
You need to be able to tie at least one field from each table to
one other
field in another table, and then you can have a query like:
SELECT videos.*, links.*, actors.*
FROM videos, links, actors
WHERE videos.VideoID = '$VideoID' AND
links.VideoID = videos.VideoID
Simon Kimber pressed the little lettered thingies in this order...
Christopher Wrote...
You need to be able to tie at least one field from each table to
one other
field in another table, and then you can have a query like:
SELECT videos.*, links.*, actors.*
FROM videos, links,
6 matches
Mail list logo