bug 857445, affected rows
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2003-12-11 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* tbl_replace.php: missing number of rows for Affected rows
|
||||
and Inserted rows; wrong message for insert ids
|
||||
|
||||
2003-12-11 Alexander M. Turek <bleibtallesanders@derrabus.de>
|
||||
* server_collations.php, lang/*.inc.php, libraries/mysql_charsets.lib.php:
|
||||
Updated character sets overview for MySQL 4.1.1.
|
||||
|
@@ -121,7 +121,10 @@ if (isset($primary_key) && ($submit_type != $strInsertAsNewRow)) {
|
||||
if (!empty($valuelist)) {
|
||||
$query[] = 'UPDATE ' . PMA_backquote($table) . ' SET ' . $valuelist . ' WHERE' . $primary_key
|
||||
. ' LIMIT 1';
|
||||
$message = $strAffectedRows . ' <br />';
|
||||
|
||||
// lem9: why a line break here?
|
||||
//$message = $strAffectedRows . ' <br />';
|
||||
$message = $strAffectedRows . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,6 +202,7 @@ else {
|
||||
*/
|
||||
$sql_query = implode(';', $query) . ';';
|
||||
$total_affected_rows = 0;
|
||||
$last_message = '';
|
||||
|
||||
foreach($query AS $query_index => $single_query) {
|
||||
$result = PMA_mysql_query($single_query);
|
||||
@@ -212,22 +216,25 @@ foreach($query AS $query_index => $single_query) {
|
||||
}
|
||||
} else {
|
||||
if (@mysql_affected_rows()) {
|
||||
$total_affected_rows += @mysql_affected_rows;
|
||||
$total_affected_rows += @mysql_affected_rows();
|
||||
}
|
||||
|
||||
$insert_id = mysql_insert_id();
|
||||
if ($insert_id != 0) {
|
||||
$message .= '<br />'.$strInsertedRowId . ' ' . $insert_id;
|
||||
$last_message .= '<br />'.$strInsertedRowId . ' ' . $insert_id;
|
||||
}
|
||||
} // end if
|
||||
}
|
||||
|
||||
if ($total_affected_rows != 0) {
|
||||
$message .= '<br />' . $total_affected_rows;
|
||||
//$message .= '<br />' . $total_affected_rows;
|
||||
$message .= $total_affected_rows;
|
||||
} else {
|
||||
$message .= $strModifications;
|
||||
}
|
||||
|
||||
$message .= $last_message;
|
||||
|
||||
if ($is_gotofile) {
|
||||
if ($goto == 'db_details.php' && !empty($table)) {
|
||||
unset($table);
|
||||
|
Reference in New Issue
Block a user