fields with 'NULL' value were affected their default value

This commit is contained in:
Loïc Chapeaux
2001-12-28 17:26:26 +00:00
parent e4362f5eb8
commit ab4a775dd8
2 changed files with 8 additions and 2 deletions

View File

@@ -198,9 +198,13 @@ for ($i = 0; $i < $fields_cnt; $i++) {
echo "\n";
// Prepares the field value
if (isset($row) && isset($row[$field])) {
if (isset($row)) {
// loic1: null field value
if (!isset($row[$field])) {
$row[$field] = 'NULL';
}
// loic1: special binary "characters"
if ($is_binary || $is_blob) {
else if ($is_binary || $is_blob) {
$row[$field] = str_replace("\x00", '\0', $row[$field]);
$row[$field] = str_replace("\x08", '\b', $row[$field]);
$row[$field] = str_replace("\x0a", '\n', $row[$field]);