Re: PHP4 and mysql_fetch_array() - one more try

From: Date: Thu, 02 Nov 2000 14:01:25 +0000
Subject: Re: PHP4 and mysql_fetch_array() - one more try
Groups: php.db 
Request: Send a blank email to php-db+get-4131@lists.php.net to get a copy of this message
>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 Please re-read the email I sent to you and the list yesterday. Your mysql_db_query is returning 0, meaning that some kind of error occurred (NOT that no rows were returned!). mysql_error() will probably tell you what the error was. You cannot safely use the return from mysql_db_query (or indeed many other functions) without first checking that it did not return an error. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org

« previous php.db (#4131) next »