User Contributed Notes 2 notes

I have noted that mssql_select_db fails if the database name contains a dash or hyphen. for example a database named foo-bar will fail and the error that is returned indicates that the name was interpreted as only 'foo'

Use of square brackets to enclose the database name is also necessary if the name contains a dot: '.'

e.g.

mssql_select_db('Company.ERP');

Produces the error:Warning: mssql_select_db(): Sybase: Server message: Could not locate entry in sysdatabases for database 'Company'. No entry found with that name. Make sure that the name is entered correctly. (severity 16, procedure N/A) in