RE: [PHP] Multipe Tables, Single Query Problem

From: Date: Tue, 19 Jun 2001 07:06:12 +0000
Subject: RE: [PHP] Multipe Tables, Single Query Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-54337@lists.php.net to get a copy of this message
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 you need a sub select, which mysql doesn’t support... Ray Hilton - me@rayh.co.uk http://rayh.co.uk -----Original Message----- From: Simon Kimber [mailto:simon@funny.co.uk] Sent: 06 June 2001 14:57 To: php-general@lists.php.net Subject: [PHP] Multipe Tables, Single Query Problem 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 all the actor names in one field... is this possible? or do i have to get the video data first and then the actors separately? Simon Kimber Funny.co.uk - The Comedy Portal http://www.funny.co.uk/ Now Incorporating: The UK Live Comedy Directory FREE promotion for UK Comedy Acts and Venues http://www.funny.co.uk/uklive/ eml. simon@funny.co.uk icq. 16156911

« previous php.general (#54337) next »