Better calculate inserted row id (bug #1156963).

This commit is contained in:
Michal Čihař
2005-03-07 13:04:46 +00:00
parent ffe8be0356
commit 5784420791
2 changed files with 3 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ $Source$
* db_printview.php, tbl_printview.php, css/phpmyadmin.css.php,
libraries/header_meta_style.inc.php: Actually use print style in themes,
also fixes RFE #1120880.
* sql.php: Better calculate inserted row id (bug #1156963).
2005-03-06 Michael Keck <mkkeck@users.sourceforge.net>
* themes/*/img/bd_deltbl.png, themes/*/bd_drop.png: Added disabled

View File

@@ -601,7 +601,8 @@ else {
$message = $strInsertedRows . '&nbsp;' . $num_rows;
$insert_id = PMA_DBI_insert_id();
if ($insert_id != 0) {
$message .= '[br]'.$strInsertedRowId . '&nbsp;' . $insert_id;
// insert_id is id of FIRST record inserted in one insert, so if we inserted multiple rows, we had to increment this
$message .= '[br]'.$strInsertedRowId . '&nbsp;' . ($insert_id + $num_rows - 1);
}
} else if ($is_affected) {
$message = $strAffectedRows . '&nbsp;' . $num_rows;