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]);