note 33163 added to ref.mssql
| From: | yvonne at cwb dot gov dot tw | Date: | Wed, 18 Jun 2003 02:39:23 +0000 |
| Subject: | note 33163 added to ref.mssql | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-50547@lists.php.net to get a copy of this message | ||
I have a code in my php program with dbname = "wel-i" (there are a "-" character
included)
$sql_ID=mssql_connect("xx.xx.xx.xx", "xxx", "xxx");
mssql_select_db("wel-i", $sql_ID);
then I got an error:
<br>
<b>Warning</b>: Sybase error: Line 1: '-' syntax errorB (severity 15) in
<b>./tt.ph
p</b> on line <b>30</b><br>
<br>
If I change to use another db with dbname="welc" (without a "-")
$sql_ID=mssql_connect("xx.xx.xx.xx", "xxx", "xxx");
mssql_select_db("welc", $sql_ID);
Then It does work very fine. Why?
Is "-" a key word?
----
Manual Page -- http://www.php.net/manual/en/ref.mssql.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33163
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33163&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33163&report=yes