mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Set default db to sqlsrv connection
This commit is contained in:
@@ -24,7 +24,13 @@ if (isset($_GET["mssql"])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function connect($server, $username, $password) {
|
function connect($server, $username, $password) {
|
||||||
$this->_link = @sqlsrv_connect(preg_replace('~:~', ',', $server), array("UID" => $username, "PWD" => $password, "CharacterSet" => "UTF-8"));
|
global $adminer;
|
||||||
|
$db = $adminer->database();
|
||||||
|
$connection_info = array("UID" => $username, "PWD" => $password, "CharacterSet" => "UTF-8");
|
||||||
|
if ($db != "") {
|
||||||
|
$connection_info["Database"] = $db;
|
||||||
|
}
|
||||||
|
$this->_link = @sqlsrv_connect(preg_replace('~:~', ',', $server), $connection_info);
|
||||||
if ($this->_link) {
|
if ($this->_link) {
|
||||||
$info = sqlsrv_server_info($this->_link);
|
$info = sqlsrv_server_info($this->_link);
|
||||||
$this->server_info = $info['SQLServerVersion'];
|
$this->server_info = $info['SQLServerVersion'];
|
||||||
|
@@ -6,6 +6,7 @@ Fix function change with set data type
|
|||||||
Increase username maxlength to 80 (bug #623)
|
Increase username maxlength to 80 (bug #623)
|
||||||
Make maxlength in all fields a soft limit
|
Make maxlength in all fields a soft limit
|
||||||
MySQL: Support foreign keys created with ANSI quotes (bug #620)
|
MySQL: Support foreign keys created with ANSI quotes (bug #620)
|
||||||
|
MSSQL: Pass database when connecting
|
||||||
|
|
||||||
Adminer 4.6.3 (released 2018-06-28):
|
Adminer 4.6.3 (released 2018-06-28):
|
||||||
Disallow using password-less databases
|
Disallow using password-less databases
|
||||||
|
Reference in New Issue
Block a user