From 3f99dcdbc650a86ac4ce10788a8f45f9ce8da33b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Sat, 8 Sep 2001 22:46:39 +0000 Subject: [PATCH] message associated to the query wasn't displayed if the location header is used --- sql.php3 | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/sql.php3 b/sql.php3 index 46eb504bf..ee90cb6e4 100755 --- a/sql.php3 +++ b/sql.php3 @@ -253,18 +253,20 @@ else { unset($db); } } + + if ($is_delete) { + $message = $strDeletedRows . ' ' . $num_rows; + } else if ($is_insert) { + $message = $strInsertedRows . ' ' . $num_rows; + } else if ($is_affected) { + $message = $strAffectedRows . ' ' . $num_rows; + } else if (!empty($zero_rows)) { + $message = $zero_rows; + } else { + $message = $strEmptyResultSet; + } + if (file_exists('./' . $goto)) { - if ($is_delete) { - $message = $strDeletedRows . ' ' . $num_rows; - } else if ($is_insert) { - $message = $strInsertedRows . ' ' . $num_rows; - } else if ($is_affected) { - $message = $strAffectedRows . ' ' . $num_rows; - } else if (!empty($zero_rows)) { - $message = $zero_rows; - } else { - $message = $strEmptyResultSet; - } $goto = ereg_replace('\.\.*', '.', $goto); if ($goto == 'db_details.php3' && !empty($table)) { unset($table); @@ -278,8 +280,7 @@ else { include('./' . $goto); } // end if file_exist else { - $message = $zero_rows; - header('Location: ' . $cfgPmaAbsoluteUri . $goto); + header('Location: ' . $cfgPmaAbsoluteUri . $goto . '&message=' . $message); } // end else exit(); } // end no rows returned