RE: [PHP-DB] mssql select db problem
| From: | Jeffrey_N_Dyke at Keane dot com | Date: | Mon, 14 Oct 2002 15:38:26 +0000 |
| Subject: | RE: [PHP-DB] mssql select db problem | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-22383@lists.php.net to get a copy of this message | ||
sorry i mis spoke, the brackets will help you in queries with tables and
columns that have spaces, not in the connect with actual dbs(at least i
don't think so).
----- Forwarded by Jeffrey N Dyke/CORP/Keane on 10/14/2002 11:40 AM -----
Jeffrey N Dyke
To: <holmes072000@charter.net>
10/14/2002 cc: "'Kadir Leblebici'"
<kadir@agribelsa.com>, php-db@lists.php.net
11:32 AM Subject: RE: [PHP-DB] mssql select db problem(Document
link: Jeff
Dyke)
i'd get rid of the space as well, or use brackets around the db name to
account for the space.
"John W. Holmes"
<holmes072000@ch To: "'Kadir Leblebici'"
<kadir@agribelsa.com>, <php-db@lists.php.net>
arter.net> cc:
Subject: RE: [PHP-DB] mssql select db problem
10/14/2002 11:30
AM
Please respond
to holmes072000
Rename your database. Either PHP or MSSQL doesn't like the '-' in the
name.
---John Holmes...
> -----Original Message-----
> From: Kadir Leblebici [mailto:kadir@agribelsa.com]
> Sent: Monday, October 14, 2002 4:36 AM
> To: php-db@lists.php.net
> Subject: [PHP-DB] mssql select db problem
>
> Hi friends
> I have big problem
> I connect to mssql server
> I connected succesful
> but i select_db
> samples code is here
>
> $hostname = "192.168.100.4";
> $username = "sa";
> $password = "";
> $dbName ="WIN-PAK 2";
>
> MSSQL_CONNECT($hostname,$username,$password) or DIE("DATABASE FAILED
TO
> RESPOND.");
> mssql_select_db($dbName) or DIE("DATABASE BULUNAMADI");
>
> message
>
> Warning: MS SQL message: Line 1: Incorrect syntax near '-'. (severity
15)
> in C:\apache\htdocs\ornek\mssql.php on line 9
>
> Warning: MS SQL: Unable to select database: WIN-PAK 2 in
> C:\apache\htdocs\ornek\mssql.php on line 9
> DATABASE BULUNAMADI
>
> where is the problem
>
> Thanks
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php