"zero" value was exported as ''
This commit is contained in:
@@ -209,7 +209,7 @@ if (!defined('__LIB_BUILD_DUMP__')){
|
|||||||
for ($j = 0; $j < $fields_cnt; $j++) {
|
for ($j = 0; $j < $fields_cnt; $j++) {
|
||||||
if (!isset($row[$j])) {
|
if (!isset($row[$j])) {
|
||||||
$values[] = 'NULL';
|
$values[] = 'NULL';
|
||||||
} else if ($row[$j] != '') {
|
} else if ($test == '0' || $test != '') {
|
||||||
// a number
|
// a number
|
||||||
if ($field_num[$j]) {
|
if ($field_num[$j]) {
|
||||||
$values[] = $row[$j];
|
$values[] = $row[$j];
|
||||||
@@ -314,7 +314,7 @@ if (!defined('__LIB_BUILD_DUMP__')){
|
|||||||
for ($j = 0; $j < $fields_cnt; $j++) {
|
for ($j = 0; $j < $fields_cnt; $j++) {
|
||||||
if (!isset($row[$j])) {
|
if (!isset($row[$j])) {
|
||||||
$schema_insert .= ' NULL, ';
|
$schema_insert .= ' NULL, ';
|
||||||
} else if ($row[$j] != '') {
|
} else if ($test == '0' || $test != '') {
|
||||||
$type = mysql_field_type($result, $j);
|
$type = mysql_field_type($result, $j);
|
||||||
// a number
|
// a number
|
||||||
if ($type == 'tinyint' || $type == 'smallint' || $type == 'mediumint' || $type == 'int' ||
|
if ($type == 'tinyint' || $type == 'smallint' || $type == 'mediumint' || $type == 'int' ||
|
||||||
@@ -487,7 +487,7 @@ if (!defined('__LIB_BUILD_DUMP__')){
|
|||||||
if (!isset($row[$j])) {
|
if (!isset($row[$j])) {
|
||||||
$schema_insert .= 'NULL';
|
$schema_insert .= 'NULL';
|
||||||
}
|
}
|
||||||
else if ($row[$j] != '') {
|
else if ($test == '0' || $test != '') {
|
||||||
// loic1 : always enclose fields
|
// loic1 : always enclose fields
|
||||||
if ($what == 'excel') {
|
if ($what == 'excel') {
|
||||||
$row[$j] = ereg_replace("\015(\012)?", "\012", $row[$j]);
|
$row[$j] = ereg_replace("\015(\012)?", "\012", $row[$j]);
|
||||||
|
Reference in New Issue
Block a user