bug 857445, affected rows

This commit is contained in:
Marc Delisle
2003-12-11 16:54:43 +00:00
parent 12a35d1a62
commit 9d5504973a
2 changed files with 15 additions and 4 deletions

View File

@@ -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.

View File

@@ -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 . '&nbsp;<br />';
// lem9: why a line break here?
//$message = $strAffectedRows . '&nbsp;<br />';
$message = $strAffectedRows . '&nbsp;';
}
}
@@ -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 . '&nbsp;' . $insert_id;
$last_message .= '<br />'.$strInsertedRowId . '&nbsp;' . $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);