set with no field selected
This commit is contained in:
@@ -10,6 +10,8 @@ $Source$
|
||||
when displaying a TEXT field
|
||||
* sql.php3, bug 448226 (Missing MySQL messages), correction from Loic.
|
||||
* tbl_change.php3, bug 442778, Edit record with two similar SET fields
|
||||
* tbl_replace.php3, could not save a row with a set which has no
|
||||
value selected
|
||||
|
||||
2001-08-06 Steve Alberty <alberty@nepunlabs.de>
|
||||
* index.php3: remove warning under Apache 2.0.23-dev
|
||||
|
@@ -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($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
|
||||
|
Reference in New Issue
Block a user