set with no field selected
This commit is contained in:
@@ -10,6 +10,8 @@ $Source$
|
|||||||
when displaying a TEXT field
|
when displaying a TEXT field
|
||||||
* sql.php3, bug 448226 (Missing MySQL messages), correction from Loic.
|
* sql.php3, bug 448226 (Missing MySQL messages), correction from Loic.
|
||||||
* tbl_change.php3, bug 442778, Edit record with two similar SET fields
|
* 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>
|
2001-08-06 Steve Alberty <alberty@nepunlabs.de>
|
||||||
* index.php3: remove warning under Apache 2.0.23-dev
|
* index.php3: remove warning under Apache 2.0.23-dev
|
||||||
|
@@ -8,7 +8,6 @@
|
|||||||
require('./grab_globals.inc.php3');
|
require('./grab_globals.inc.php3');
|
||||||
require('./lib.inc.php3');
|
require('./lib.inc.php3');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes some variables
|
* Initializes some variables
|
||||||
*/
|
*/
|
||||||
@@ -90,14 +89,16 @@ if (isset($primary_key) && ($submit_type != $strInsertAsNewRow)) {
|
|||||||
break;
|
break;
|
||||||
} // end switch
|
} // end switch
|
||||||
|
|
||||||
if (empty($funcs[$key])) {
|
if (!empty($val)) {
|
||||||
$valuelist .= backquote($key) . ' = ' . $val . ', ';
|
if (empty($funcs[$key])) {
|
||||||
} else {
|
$valuelist .= backquote($key) . ' = ' . $val . ', ';
|
||||||
$valuelist .= backquote($key) . " = $funcs[$key]($val), ";
|
} else {
|
||||||
|
$valuelist .= backquote($key) . " = $funcs[$key]($val), ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} // end while
|
} // end while
|
||||||
|
|
||||||
// Builds the sql upate query
|
// Builds the sql update query
|
||||||
$valuelist = ereg_replace(', $', '', $valuelist);
|
$valuelist = ereg_replace(', $', '', $valuelist);
|
||||||
$query = 'UPDATE ' . backquote($table) . " SET $valuelist WHERE $primary_key";
|
$query = 'UPDATE ' . backquote($table) . " SET $valuelist WHERE $primary_key";
|
||||||
} // end row update
|
} // end row update
|
||||||
|
Reference in New Issue
Block a user