From bf4654c424cca07688c445392d9777184ff281fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Fri, 2 Nov 2001 18:31:23 +0000 Subject: [PATCH] Re-display erroneous query in the textarea --- sql.php3 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sql.php3 b/sql.php3 index 7f4a1aa10..2c966df40 100755 --- a/sql.php3 +++ b/sql.php3 @@ -224,9 +224,12 @@ else { // Displays an error message if required and stop parsing the script if (mysql_error()) { - $error = mysql_error(); + $error = mysql_error(); include('./header.inc.php3'); - mysql_die($error, $full_sql_query, '', $err_url); + $full_err_url = (ereg('^(db_details|tbl_properties)', $err_url)) + ? $err_url . '&show_query=y&sql_query=' . urlencode($sql_query) + : $err_url; + mysql_die($error, $full_sql_query, '', $full_err_url); } // Gets the number of rows affected/returned