cvs: php4 /ext/mysql/ php_mysql.c

From: Date: Mon, 15 May 2000 13:46:38 +0000
Subject: cvs: php4 /ext/mysql/ php_mysql.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-15043@lists.php.net to get a copy of this message
andrei Mon May 15 15:46:38 2000 EDT Modified files: /php4/ext/mysql php_mysql.c Log: @- NULL values are now preserved in the return value of mysql_fetch_array() @ and mysql_fetch_object(). (Andrei) Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.42 php4/ext/mysql/php_mysql.c:1.43 --- php4/ext/mysql/php_mysql.c:1.42 Tue May 2 02:44:24 2000 +++ php4/ext/mysql/php_mysql.c Mon May 15 15:46:37 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c,v 1.42 2000/05/02 00:44:24 sas Exp $ */ +/* $Id: php_mysql.c,v 1.43 2000/05/15 13:46:37 andrei Exp $ */ /* TODO: @@ -1317,8 +1317,11 @@ add_assoc_stringl(return_value, mysql_field->name, data, data_len, should_copy); } } else { - /* NULL field, don't set it */ - /* add_get_index_stringl(return_value, i, empty_string, 0, (void **) &pval_ptr); */ + /* NULL value. */ + if (result_type & MYSQL_NUM) + add_index_unset(return_value, i); + else + add_assoc_unset(return_value, mysql_field->name); } } }

« previous php.version4 (#15043) next »