RE: [PHP-DB] PHP4 and mysql_fetch_array() - one more try

From: Date: Thu, 02 Nov 2000 14:36:29 +0000
Subject: RE: [PHP-DB] PHP4 and mysql_fetch_array() - one more try
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-4134@lists.php.net to get a copy of this message
> -----Original Message----- > From: Robert Vetter [mailto:vetter@rundschau-onlinedienst.de] > Sent: Thursday, November 02, 2000 8:24 AM > To: Phil Driscoll > Cc: php-db@lists.php.net > Subject: Re: [PHP-DB] PHP4 and mysql_fetch_array() - one more try > > > > 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. > > > sorry, I can't agree. > The code example from my first email works fine with PHP3. I have plenty > of scripts, which use that code scheme, that run with PHP3 without any > problems. After I had upgraded my Apache server to PHP4 in my testing > environtment I got those warning messages. For me it means that there > are some compatibility problems between PHP3 and PHP4. Oh, c'mon...just humor us by testing the return value of your mysql_query() and making a call to mysql_error() if it's zero. Y'never know...it might just show you something useful... --- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer | at himself, for he shall never cease LeTourneau University | to be entertained." Longview, Texas, USA | -- John Powell

« previous php.db (#4134) next »