I am trying to connect to SQL Server using PHP, I am learning this language.
I read that perhaps the ODBC connection is the best, I created my ODBC, but I don't know how to use it with PHP while I try this:
$server = 'MyServer\MyDB';
$link = mssql_connect=($server, 'MyUser', '');
if (!$link) {
die('You cannot connect to MSSQL');
}
When doing this, I get this message:
OBJECT NOT FOUND, ERROR 404.
But the ODBC test is fine.
SQL Server is located on the same PC, so maybe I donβt need to enter an IP address.
Is there anyone who can help?
farp332
source
share