From 138da505ebf07230b4022f789567c2ed3130ff25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Sun, 9 Sep 2001 16:44:30 +0000 Subject: [PATCH] message associated to the query wasn't displayed if the location header is used --- tbl_replace.php3 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tbl_replace.php3 b/tbl_replace.php3 index 467962a60..9762c0a01 100755 --- a/tbl_replace.php3 +++ b/tbl_replace.php3 @@ -116,7 +116,7 @@ if (isset($primary_key) && ($submit_type != $strInsertAsNewRow)) { $message = $strNoModification; include('./' . ereg_replace('\.\.*', '.', $goto)); } else { - header('Location: ' . $cfgPmaAbsoluteUri . $goto); + header('Location: ' . $cfgPmaAbsoluteUri . $goto . '&message=' . $strNoModification); } exit(); } @@ -193,7 +193,7 @@ else { * page */ mysql_select_db($db); -$sql_query = $query; +$sql_query = $query . ';'; $result = mysql_query($query); if (!$result) { @@ -201,20 +201,20 @@ if (!$result) { include('./header.inc.php3'); mysql_die($error); } else { + if (@mysql_affected_rows()) { + $message .= @mysql_affected_rows(); + } else { + $message = $strModifications; + } if (file_exists('./' . $goto)) { if ($goto == 'db_details.php3' && !empty($table)) { unset($table); } $js_to_run = 'functions.js'; include('./header.inc.php3'); - if (@mysql_affected_rows()) { - $message .= @mysql_affected_rows(); - } else { - $message = $strModifications; - } include('./' . ereg_replace('\.\.*', '.', $goto)); } else { - header('Location: ' . $cfgPmaAbsoluteUri . $goto); + header('Location: ' . $cfgPmaAbsoluteUri . $goto . '&message=' . $message); } exit(); } // end if