set with no field selected

This commit is contained in:
Marc Delisle
2001-08-07 00:11:09 +00:00
parent bfbab21e0b
commit f32311b9f0
2 changed files with 9 additions and 6 deletions

View File

@@ -8,7 +8,6 @@
require('./grab_globals.inc.php3');
require('./lib.inc.php3');
/**
* Initializes some variables
*/
@@ -90,14 +89,16 @@ if (isset($primary_key) && ($submit_type != $strInsertAsNewRow)) {
break;
} // end switch
if (empty($funcs[$key])) {
$valuelist .= backquote($key) . ' = ' . $val . ', ';
} else {
$valuelist .= backquote($key) . " = $funcs[$key]($val), ";
if (!empty($val)) {
if (empty($funcs[$key])) {
$valuelist .= backquote($key) . ' = ' . $val . ', ';
} else {
$valuelist .= backquote($key) . " = $funcs[$key]($val), ";
}
}
} // end while
// Builds the sql upate query
// Builds the sql update query
$valuelist = ereg_replace(', $', '', $valuelist);
$query = 'UPDATE ' . backquote($table) . " SET $valuelist WHERE $primary_key";
} // end row update