Using php I am trying to connect to a SQL Server table which has a hyphen in the name, error returned is
Warning: mssql_select_db() [function.mssql-select-db]: message: Could not locate entry in sysdatabases for database 'SMD'. No entry found with that name. Make sure that the name is entered correctly. (severity 16) in C:\xampp\xampp\htdocs\second.php on line 12
Warning: mssql_select_db() [function.mssql-select-db]: Unable to select database: SMD-GROUP in C:\xampp\xampp\htdocs\second.php on line 12
Couldn't open database SMD-GROUP
Code is
$myDB = "SMD-GROUP";
$selected = mssql_select_db($myDB, $dbhandle)
or die("Couldn't open database $myDB");