Home  >  Article  >  Backend Development  >  PHP联接sqlserver数据库,数据库中有名为BS3000+_001_2011这种带+号的数据库,无法选择进入该数据库?

PHP联接sqlserver数据库,数据库中有名为BS3000+_001_2011这种带+号的数据库,无法选择进入该数据库?

WBOY
WBOYOriginal
2016-06-13 12:48:59863browse

PHP连接sqlserver数据库,数据库中有名为BS3000+_001_2011这种带+号的数据库,无法选择进入该数据库??
Warning: mssql_select_db() [function.mssql-select-db]: message: 未能在 sysdatabases 中找到数据库 'BS3000' 所对应的条目。没有找到具有该名称的条目。请确保正确地输入了名称。 (severity 16) in C:\AppServ\www\sql.php on line 4
Warning: mssql_select_db() [function.mssql-select-db]: Unable to select database: BS3000+_001_2011 in C:\AppServ\www\sql.php on line 4

其他纯字母的数据库可以正常选择,不报错,就只有这种带+号,就不能选择。

数据库 sqlserver php
------解决方案--------------------
转义一下看看 [BS3000+_001_2011]
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn