Select query with Forein key Relation

From: Date: Wed, 23 Apr 2008 09:11:33 +0000
Subject: Select query with Forein key Relation
Groups: php.db 
Request: Send a blank email to php-db+get-44895@lists.php.net to get a copy of this message
Hi, I have a table which contains 2 foreign key relation columns. I'm trying to get all columns from main table as well as all column from those 2 foreign key relation tables. The query i'm using is : select * from gig where gig.gigid = $gigDetail LEFT JOIN genre ON gig.genreId=genre.genreId LEFT JOIN venue ON gig.venueID = venue.vid ORDER BY gig.gigid"; is this query OK? I know how to get value from gig table colums but how could i get value of columns from venue table? Regards Nasreen Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

« previous php.db (#44895) next »