Re: MSSQL DB Connect

From: Date: Fri, 21 Dec 2001 17:50:18 +0000
Subject: Re: MSSQL DB Connect
References: 1  Groups: php.db php.dev php.windows 
Request: Send a blank email to php-db+get-15187@lists.php.net to get a copy of this message
What was the error message you received? Also, when passing the variables to the mssql_connect() function, you need not use quotes since you've already initialized them to the strings. Pass them as follows: $connection = mssql_connect($a,$b,$c). Also, you aren't passing the actual sql string to the mssql_query() function. You have $sql = "blah" but you pass $sql_temp. "Jerry" <jerryuk007@gmx.net> wrote in message news:20011221114703.1701.qmail@pb1.pair.com... > Hi > > 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 > >

« previous php.db (#15187) next »