title: Using PHP to connect to SQL Server
body: <p>Using php I am trying to connect to a SQL Server table which has a hyphen in the name, error returned is </p>
  
  <blockquote>
    <p>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</p>
    
    <p>Warning: mssql_select_db() [function.mssql-select-db]: Unable to select database: SMD-GROUP in C:\xampp\xampp\htdocs\second.php on line 12<br>
    Couldn't open database SMD-GROUP</p>
  </blockquote>
  
  <p>Code is </p>
  
  <pre><code>    $myDB = "SMD-GROUP"; 
       $selected = mssql_select_db($myDB, $dbhandle)
       or die("Couldn't open database $myDB"); 
  </code></pre>