|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-29 13:02 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 03:00:02 2025 UTC |
Description: ------------ Hi, I am trying to coonect to MS SQL 2000 from PHP. The connection is all the times but when i give a database name with $ sign in it then it fails. Can you let me know if we have way out from this Thanks Parth Reproduce code: --------------- $myServer = "localhost"; $myUser = "sa"; $myPass = ""; $myDB = "DE$CIP"; $s = @mssql_connect($myServer, $myUser, $myPass) or die("Couldn't connect to SQL Server on $myServer"); $d = @mssql_select_db([DE$CIP], $s) or die("Couldn't open database $myDB"); Expected result: ---------------- Get connected to the database Actual result: -------------- Notice: Undefined variable: CIP in D:\inetpub\livesite\DE_2\catalog\sql.php on line 6 Couldn't open database DE