diff --git a/adminer/drivers/mssql.inc.php b/adminer/drivers/mssql.inc.php index 387d502f..31efda29 100644 --- a/adminer/drivers/mssql.inc.php +++ b/adminer/drivers/mssql.inc.php @@ -160,6 +160,13 @@ if (isset($_GET["mssql"])) { return get_val("SELECT SCOPE_IDENTITY()"); // @@IDENTITY can return trigger INSERT } + function explain($connection, $query) { + $connection->query("SET SHOWPLAN_ALL ON"); + $return = $connection->query($query); + $connection->query("SET SHOWPLAN_ALL OFF"); // connection is used also for indexes + return $return; + } + } else { class MssqlDb extends PdoDb { function select_db($database) { @@ -177,6 +184,9 @@ if (isset($_GET["mssql"])) { return $connection->lastInsertId(); } + function explain($connection, $query) { + } + if (extension_loaded("pdo_sqlsrv")) { class Db extends MssqlDb { public $extension = "PDO_SQLSRV"; @@ -556,13 +566,6 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table), $connection2) as $row ; } - function explain($connection, $query) { - $connection->query("SET SHOWPLAN_ALL ON"); - $return = $connection->query($query); - $connection->query("SET SHOWPLAN_ALL OFF"); // connection is used also for indexes - return $return; - } - function found_rows($table_status, $where) { } diff --git a/tests/generate-pdo.php b/tests/generate-pdo.php index 24fdaa67..6dc3b333 100755 --- a/tests/generate-pdo.php +++ b/tests/generate-pdo.php @@ -10,6 +10,7 @@ foreach (glob("*.html") as $filename) { return "/$match[1].php?ext=pdo" . ($match[3] ? "&" : ""); }, $file); $file = str_replace("