From d5dd86eb1c251eb8bb78688e09ad32bed0d3b9ad Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 28 May 2005 19:35:21 +0000 Subject: [PATCH] r202: Use MySQL NULL to handle defaults --- admin/fields.php | 2 +- showreport.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/fields.php b/admin/fields.php index c32cb2a..df63335 100644 --- a/admin/fields.php +++ b/admin/fields.php @@ -150,7 +150,7 @@ if ($_REQUEST['do'] == 'update') )" ); - $db->query("ALTER TABLE " . TABLE_PREFIX . "bugvaluefill ADD " . $bugsys->in['shortname'] . " MEDIUMTEXT NOT NULL"); + $db->query("ALTER TABLE " . TABLE_PREFIX . "bugvaluefill ADD " . $bugsys->in['shortname'] . " MEDIUMTEXT NULL"); $db->query("OPTIMIZE TABLE " . TABLE_PREFIX . "bugvaluefill"); } else diff --git a/showreport.php b/showreport.php index 057db6b..c7acabc 100644 --- a/showreport.php +++ b/showreport.php @@ -79,7 +79,7 @@ foreach ($fieldvalues AS $shortname => $value) $customfields .= "
$field[name]: "; - if ($value == '') + if (is_null($value)) { $value = $field['defaultvalue']; } -- 2.43.5