I am restricted to use only PHP mssql module to use with MS Azure SQL Server.
I am able to maintain connection by adding: ~/.freetds.conf:
[aftermath]
database = mydatabase
host = myhostname.database.windows.net
port = 1433
tds version = 8.0
My code in PHP
$myServer = "aftermath"
$myUser = username@hostname
$myPass = obviously_my_pass
$dbhandle = mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
But when I check which database is selected it returns:
master
instead of my desired database which is specified in my freetds.conf file
Module sqlsrv is not installed on my hosting and I do not have rights to install it.
Can you tell me how can I resolve this issue?