andi Thu Feb 17 15:11:20 2005 EDT Modified files: /php-src/ext/msql php_msql.c Log: - Fix Bug #31960: msql_fetch_row() and msql_fetch_array() dropping columns with NULL values http://cvs.php.net/diff.php/php-src/ext/msql/php_msql.c?r1=1.58&r2=1.59&ty=u Index: php-src/ext/msql/php_msql.c diff -u php-src/ext/msql/php_msql.c:1.58 php-src/ext/msql/php_msql.c:1.59 --- php-src/ext/msql/php_msql.c:1.58 Mon Jul 19 03:19:38 2004 +++ php-src/ext/msql/php_msql.c Thu Feb 17 15:11:19 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_msql.c,v 1.58 2004/07/19 07:19:38 andi Exp $ */ +/* $Id: php_msql.c,v 1.59 2005/02/17 20:11:19 andi Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -958,9 +958,14 @@ add_assoc_stringl(return_value, msql_field->name, data, data_len, should_copy); } } else { - /* - add_get_index_stringl(return_value, i, "", 0, (void **) &pval_ptr, 1); - */ + /* NULL value. */ + if (result_type & MSQL_NUM) { + add_index_null(return_value, i); + } + + if (result_type & MSQL_ASSOC) { + add_assoc_null(return_value, msql_field->name); + } } } }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php