Re: Multipe Tables, Single Query Problem

From: Date: Tue, 19 Jun 2001 06:29:50 +0000
Subject: Re: Multipe Tables, Single Query Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-54328@lists.php.net to get a copy of this message
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 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 actors.ActorID = links.ActorID You should consider picking up the book called "MySQL." It covers this sort of thing rather well. Good luck... Christopher Ostmo a.k.a. tech@AppIdeas.com AppIdeas.com Meeting cutting edge dynamic web site needs For a good time, http://www.AppIdeas.com/

« previous php.general (#54328) next »