diff --git a/plugins/sql-log.php b/plugins/sql-log.php index bcaadf79..aee8366f 100644 --- a/plugins/sql-log.php +++ b/plugins/sql-log.php @@ -26,7 +26,7 @@ class AdminerSqlLog extends Adminer\Plugin { private function log($query) { if ($this->filename == "") { - $this->filename = Adminer\adminer()->database() . ".sql"; // no database goes to ".sql" to avoid collisions + $this->filename = Adminer\adminer()->database() . ($_GET["ns"] != "" ? ".$_GET[ns]" : "") . ".sql"; // no database goes to ".sql" to avoid collisions } $fp = fopen($this->filename, "a"); flock($fp, LOCK_EX);