From bc54ef7d5061979ae5323df88af2302395053de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Wed, 14 Nov 2001 20:49:43 +0000 Subject: [PATCH] "zero" value was exported as '' --- libraries/build_dump.lib.php3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/build_dump.lib.php3 b/libraries/build_dump.lib.php3 index cdc672b7d..ec6a099bd 100644 --- a/libraries/build_dump.lib.php3 +++ b/libraries/build_dump.lib.php3 @@ -209,7 +209,7 @@ if (!defined('__LIB_BUILD_DUMP__')){ for ($j = 0; $j < $fields_cnt; $j++) { if (!isset($row[$j])) { $values[] = 'NULL'; - } else if ($row[$j] != '') { + } else if ($test == '0' || $test != '') { // a number if ($field_num[$j]) { $values[] = $row[$j]; @@ -314,7 +314,7 @@ if (!defined('__LIB_BUILD_DUMP__')){ for ($j = 0; $j < $fields_cnt; $j++) { if (!isset($row[$j])) { $schema_insert .= ' NULL, '; - } else if ($row[$j] != '') { + } else if ($test == '0' || $test != '') { $type = mysql_field_type($result, $j); // a number if ($type == 'tinyint' || $type == 'smallint' || $type == 'mediumint' || $type == 'int' || @@ -487,7 +487,7 @@ if (!defined('__LIB_BUILD_DUMP__')){ if (!isset($row[$j])) { $schema_insert .= 'NULL'; } - else if ($row[$j] != '') { + else if ($test == '0' || $test != '') { // loic1 : always enclose fields if ($what == 'excel') { $row[$j] = ereg_replace("\015(\012)?", "\012", $row[$j]);