Re: cvs: php4 /ext/mysql php_mysql.c

From: Date: Thu, 06 Dec 2001 15:20:47 +0000
Subject: Re: cvs: php4 /ext/mysql php_mysql.c
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-72753@lists.php.net to get a copy of this message
What is the difference between : if (mysql_result && type==le_result && !mysql_eof(mysql_result)) { and if (mysql_result && type==le_result) { if (!mysql_eof(mysql_result)) { except the second is more readable :)))) Regards, Andrey Hristov ----- Original Message ----- From: "Zeev Suraski" <zeev@zend.com> To: <php-cvs@lists.php.net> Sent: Thursday, December 06, 2001 5:04 PM Subject: [PHP-CVS] cvs: php4 /ext/mysql php_mysql.c > zeev Thu Dec 6 10:04:24 2001 EDT > > Modified files: > /php4/ext/mysql php_mysql.c > Log: > Work around a quirk in the MySQL client library to fix unbuffered queries > > > Index: php4/ext/mysql/php_mysql.c > diff -u php4/ext/mysql/php_mysql.c:1.110 php4/ext/mysql/php_mysql.c:1.111 > --- php4/ext/mysql/php_mysql.c:1.110 Thu Dec 6 04:56:24 2001 > +++ php4/ext/mysql/php_mysql.c Thu Dec 6 10:04:23 2001 > @@ -16,7 +16,7 @@ > +----------------------------------------------------------------------+ > */ > > -/* $Id: php_mysql.c,v 1.110 2001/12/06 09:56:24 mfischer Exp $ */ > +/* $Id: php_mysql.c,v 1.111 2001/12/06 15:04:23 zeev Exp $ */ > > > /* TODO: > @@ -1004,10 +1004,12 @@ > MYSQL_RES *mysql_result; > > mysql_result = (MYSQL_RES *) zend_list_find(mysql->active_result_id, &type); > - if (mysql_result && type==le_result && !mysql_eof(mysql_result)) { > - php_error(E_NOTICE, "Called %s() without first fetching all rows from a previous > unbuffered query", > - get_active_function_name(TSRMLS_C)); > - while (mysql_fetch_row(mysql_result)); > + if (mysql_result && type==le_result) { > + if (!mysql_eof(mysql_result)) { > + php_error(E_NOTICE, "Called %s() without first fetching all rows from a previous > unbuffered query", > + get_active_function_name(TSRMLS_C)); > + while (mysql_fetch_row(mysql_result)); > + } > zend_list_delete(mysql->active_result_id); > mysql->active_result_id = 0; > } > > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net > For additional commands, e-mail: php-cvs-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.dev (#72753) next »