diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index aa5b36a9..1460906e 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -905,7 +905,8 @@ function is_url($string) { */ function slow_query($query) { global $adminer, $token; - if (support("kill") && is_object($connection2 = connect()) && (DB == "" || $connection2->select_db(DB))) { + $db = $adminer->database(); + if (support("kill") && is_object($connection2 = connect()) && ($db == "" || $connection2->select_db($db))) { $kill = $connection2->result("SELECT CONNECTION_ID()"); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL ?>