help: access ms sql server 7 with php3

Dan Lukes dan at fio.cz
Thu May 18 12:13:54 EDT 2000


> if I want to connect to computer next to me 
> (10.21.1.71) then what command should I issue ??
> btw: in mysql I've just did $db=mysql_connect("10.21.1.71","user","pass")
> but in freetds..

   Replace mysql_* to mssql_* in your code. 
   FreeTDS doesn't use the IP adress as the first argument of 
_connect/_pconnect . You should create $SYBASE/interface file, for 
example:
-------------
MYTESTSERVER
   query tcp ether address.private.com 5000

OTHERTESTSERVER
   query tcp ether 10.21.1.71 5000
-------------
 then call $db=mssql_connect("OTHERTESTSERVER","user",password")

Hope this help.

Dan



More information about the FreeTDS mailing list