From 176161e88d3c1ebb1de9bc74ba2f237a04cb0fd1 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Mon, 14 Dec 2009 13:17:54 +0000 Subject: [PATCH] EXPLAIN for UNIONs git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1266 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- adminer/lang/zh-tw.inc.php | 1 + adminer/sql.inc.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/adminer/lang/zh-tw.inc.php b/adminer/lang/zh-tw.inc.php index 84ce6897..294d5ea2 100644 --- a/adminer/lang/zh-tw.inc.php +++ b/adminer/lang/zh-tw.inc.php @@ -225,4 +225,5 @@ $translations = array( '%d e-mail(s) have been sent.' => '已發送 %d 封郵件。', 'Webserver file %s' => '網頁伺服器檔案 %s', 'File does not exist.' => '檔案不存在', + 'Item has been deleted.' => '該項目已被刪除', ); diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index 2e9fce3b..1f4a6a33 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -74,12 +74,12 @@ if (!$error && $_POST) { $result = $connection->store_result(); if (is_object($result)) { select($result, $connection2); - if ($connection2 && preg_match("~^$space*SELECT$space+~isU", $q)) { + if ($connection2 && preg_match("~^($space|\\()*SELECT\\b~isU", $q)) { $id = "explain-$explain"; echo "

" . ($result->num_rows ? lang('%d row(s)', $result->num_rows) . ", " : ""); echo "EXPLAIN\n"; echo "

\n"; $explain++; }