Re: MSSQL DB Connect
| From: | Frank M. Kromann | Date: | Fri, 21 Dec 2001 17:38:57 +0000 |
| Subject: | Re: MSSQL DB Connect | ||
| Groups: | php.db php.dev php.windows | ||
| Request: | Send a blank email to php-dev+get-74723@lists.php.net to get a copy of this message | ||
Hi Jerry,
You need to have the Client Tools for MS SQL Server installed on your PHP4 box. These tools is found
on the CD, or you can just copy ntwdblib.dll fom one system to another.
The default communication protocol will be netbios, if you want to change that to tcp/ip you need to
install the tools. One of the toiols is called "Client Network Utility". You can use this
to specify aliases for your host names s[ your system knows the protocol to use.
- Frank
P.S You also need to enable the mssql extension !
> I have PHP on windows 2000 web server
> I would like to remote to a MS SQL database on another web server.
> I tried something like:
>
> <?php
> $h = "server adr";
> $u = "user";
> $p = "passw";
> $b = "db";
> $connexion = mssql_connect("$h", "$u", "$p");
> mssql_select_db($b);
> $sql = "select * from test";
> $result = mssql_query($sql_temp);
> mssql_close($connexion);
> ?>
>
> But it didn't work. Please help me.
>
> Jerry
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>