RE: [PHP] Help SQLServer connection: What's "server_name"??

From: Date: Thu, 12 Aug 2004 12:16:58 +0000
Subject: RE: [PHP] Help SQLServer connection: What's "server_name"??
Groups: php.general 
Request: Send a blank email to php-general+get-193543@lists.php.net to get a copy of this message
[snip] Hi all, that's my first question here, I'm not subscribed. I'm tring to connect a local DB (Apache+sqlserver2K), but when I execute this simple example: <?php $conectID = mssql_connect(????,"SA",""); mssql_select_db("Northwind"); $result=mssql_query("select * from products",$numero ); while ($row=mssql_fetch_array($result)) { $counter++; $c1=$row["ProductName"]; $c2=$row["UnitPrice"]; echo ("$counter c1: $c1 c2: $c2\n"); } mssql_close($conectID); ?> I get: Warning: MS SQL: Unable to connect to server: ???? I tried many words in there (????): "localhost", "LOCAL", PCs name, name that appears in Enterprisa Manager.... I don't know what word is asking me for.... it's a stupid question, I know, but.... [/snip] Do you know the IP address? You could try 127.0.0.1 if it is the server you are working on. If it is a remote server you can get the IP from your network admin

« previous php.general (#193543) next »