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

[email protected] (Chris)
Newsgroups php.db
Message-ID <[email protected]>
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 false 
(eg an sql error).

See how many rows are returned:

echo mysql_num_rows($result);

What does that query return when you run it outside of php?

-- 
Postgresql & php tutorials
http://www.designmagick.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.