Re: [PHP4BETA] Tests?
| From: | Karl Pielorz | Date: | Fri, 30 Apr 1999 09:46:46 +0000 |
| Subject: | Re: [PHP4BETA] Tests? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-594@lists.php.net to get a copy of this message | ||
Zeev Suraski wrote:
> > I reported some problems a while ago, a lot of our database code under 3.0
> > does things like:
> >
> > "
> > /* Connect to the Database */
> > $MainDB = mysql_connect( $SQLDB_ServerName, $SQLDB_UserName, $SQLDB_Password
> > );
> > if( $MainDB == false ){
> > sql_fail( "Connecting to stat DB" );
> > }
> > $Temp = mysql_select_db( $SQLDB_DBName, $MainDB );
> >
> > /* Error if we can't connect */
> >
> > if( $Temp == false ){ <<<---- FAILS HERE? (Bizzare, but this is where it says
> > it's failed!)
> > echo( "Failed to connect / login to the stat database.\n" );
> > echo( mysql_error().":".mysql_errno() );
> > exit();
> > }
> > "
> >
> > This falls over with "Warning: 1 is not a MySQL link index on line 160".
>
> Hmm, weird. I'll check that code in the evening. What's line 160, by
> the way?
Line #160 is the line marked with "<<<------" which is why I thought it was a
bit odd... :)
> Nah, it's actually the first time somebody actually reports that it was
> worth it :)
Oh well, I'll say it again for the hell of it - PHP4/Zend is way faster than
PHP3 - Especially on larger programs with many includes... :-) - I don't have
any precise figures for this yet (as we're still trying to get the existing
PHP3 code to run under PHP4 - we're stuck with the above problem) - but for
iterative loops etc. - it's blinding...
-Karl
--
PHP 4 Beta