maybe fixed bugs #458324 and #457260 (update statement with a limit clause pb)

This commit is contained in:
Loïc Chapeaux
2001-09-04 12:54:39 +00:00
parent dd51fca8b4
commit 2e6fb3bf45

View File

@@ -104,7 +104,8 @@ if (isset($primary_key) && ($submit_type != $strInsertAsNewRow)) {
// Builds the sql upate query
$valuelist = ereg_replace(', $', '', $valuelist);
if (!empty($valuelist)) {
$query = 'UPDATE ' . backquote($table) . ' SET ' . $valuelist . ' WHERE' . $primary_key . ' LIMIT 1';
$query = 'UPDATE ' . backquote($table) . ' SET ' . $valuelist . ' WHERE' . $primary_key
. ((MYSQL_INT_VERSION >= 32300) ? ' LIMIT 1' : '');
$message = $strAffectedRows . ' ';
}
// No change -> move back to the calling script