Re: PHP4 and mysql_fetch_array() - one more try

From: Date: Thu, 02 Nov 2000 13:01:52 +0000
Subject: Re: PHP4 and mysql_fetch_array() - one more try
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-4130@lists.php.net to get a copy of this message
JD Daniels wrote: > > Strange, I get the exact same result with Apache 1.3.12 , SCO 3.2 v5.0.5, > MySQL 3.23, and PHP 4. But I downloaded Agriasofts package for my win 2000 > machine ( to develop on), and it works no problem. As far as I can tell, I > have PHP and MySQL configured exactly the same on both machines. Very > confusing. > I found this on the PHP FAQ: > http://www.php.net/FAQ.php#7.12 Thanks for the link to the FAQ. They say there that: "You are trying to use a result identifier that is 0. The 0 indicates that your query failed for some reason. You need to check for errors after submitting a query and before you attempt to use the returned result identifier." Well, I can't quite understand this, because it is not an error if a SELECT query returns no rows! An error is, for example, if there would be a syntax error in SQL statement, or a query on a non-existing table, or something like this. I think PHP developers should have a look at this issue... Robert Vetter

« previous php.db (#4130) next »