Re: [PHP-DB] Why $row is EMPTY

2008-04-29 Thread Chris
Nasreen Laghari wrote: Hi, Why my program is not going in while loop? When I run the same query in SQL cmd, it brings result but here when I print $result gives Resouce ID number means $result has data then why $row is empty. No, it means the query worked. If it wasn't a resource it would be

Re: [PHP-DB] Why $row is EMPTY

2008-04-29 Thread Ken Keefe
Try doing print_r($row); in your while loop and see what exactly is in that array. Ken On Tue, Apr 29, 2008 at 1:46 PM, Jon L. <[EMAIL PROTECTED]> wrote: > I could be wrong, but I don't think table aliases continue to exist in PHP; > only the column names. > > $g_name = $row["gigName"]; >

Re: [PHP-DB] Why $row is EMPTY

2008-04-29 Thread Jon L.
I could be wrong, but I don't think table aliases continue to exist in PHP; only the column names. $g_name = $row["gigName"]; $vname = $row["venueName"]; $genre = $row["name"]; You may also consider revising the query to only grab the columns you need, using an alias for at lea

[PHP-DB] Why $row is EMPTY

2008-04-29 Thread Nasreen Laghari
Hi, Why my program is not going in while loop? When I run the same query in SQL cmd, it brings result but here when I print $result gives Resouce ID number means $result has data then why $row is empty. $query = 'SELECT * FROM `gig` LEFT JOIN genre ON gig.genreId=genre.genreId LEFT JOIN venue ON