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" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]