Re: [PHP] Multipe Tables, Single Query Problem

2001-06-19 Thread Chris Aitken
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

Re: [PHP] Multipe Tables, Single Query Problem

2001-06-19 Thread Christopher Ostmo
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

RE: [PHP] Multipe Tables, Single Query Problem

2001-06-19 Thread Ray Hilton
you need a sub select, which mysql doesn’t support... Ray Hilton - [EMAIL PROTECTED] http://rayh.co.uk -Original Message- From: Simon Kimber [mailto:[EMAIL PROTECTED]] Sent: 06 June 2001 14:57 To: [EMAIL PROTECTED] Subject: [PHP] Multipe Tables, Single Query Problem Hi all, I have three

Re: [PHP] Multipe Tables, Single Query Problem

2001-06-19 Thread Hugh Bothwell
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

RE: [PHP] Multipe Tables, Single Query Problem

2001-06-19 Thread Simon Kimber
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

RE: [PHP] Multipe Tables, Single Query Problem

2001-06-19 Thread Christopher Ostmo
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,

[PHP] Multipe Tables, Single Query Problem

2001-06-18 Thread Simon Kimber
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 query returning just one row, ie. with