Re: [PHP-DB] Select query with Forein key Relation

2008-04-23 Thread Evert Lammerts
of columns do i need to do following in php /while ($row = mysql_fetch_array($result)) {/ /$sub= $row[venue].[vname];/ /}/ Regards - Original Message From: Evert Lammerts <[EMAIL PROTECTED]> To: Nasreen Laghari <[EMAIL PROTECTED]> Cc: php-db@lists.php.net Sent

Re: [PHP-DB] Select query with Forein key Relation

2008-04-23 Thread Evert Lammerts
SELECT * FROM gig LEFT JOIN genre ON gig.genreId = genre.genreId LEFT JOIN venue ON gig.venueID = venue.vid WHERE gig.gigid = $gigdetail I'd replace the dash with [table].[columnames]. Also, you're using four different naming conventions in your columns - gigid, genreId, venueID and vid. If I w

[PHP-DB] Select query with Forein key Relation

2008-04-23 Thread Nasreen Laghari
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.genr