tried to fix some "NULL" value problems

This commit is contained in:
Loïc Chapeaux
2001-08-27 23:26:09 +00:00
parent 47397519bd
commit 7161a08252
5 changed files with 30 additions and 6 deletions

View File

@@ -30,7 +30,10 @@ if (isset($submit)) {
$query .= ' ' . $field_attribute[$i];
}
if ($field_default[$i] != '') {
if (get_magic_quotes_gpc()) {
if (strtoupper($field_default[$i]) == 'NULL') {
$query .= ' DEFAULT NULL';
}
else if (get_magic_quotes_gpc()) {
$query .= ' DEFAULT \'' . sql_addslashes(stripslashes($field_default[$i])) . '\'';
} else {
$query .= ' DEFAULT \'' . sql_addslashes($field_default[$i]) . '\'';