Re: MSSQL connect
| From: | Thomas \"omega\" Henning | Date: | Wed, 26 Dec 2001 07:49:32 +0000 |
| Subject: | Re: MSSQL connect | ||
| References: | 1 | Groups: | php.db php.dev php.windows |
| Request: | Send a blank email to php-dev+get-75046@lists.php.net to get a copy of this message | ||
<?php
$h = "server adr"; //don't forget 2 change this
$u = "user"; //don't forget 2 chage this
$p = "passw"; //don't forget 2 change this
$b = "db"; //don't forget 2 change this
$connexion = mssql_connect("$h", "$u", "$p");
Why do you uses quotes here?
mssql_select_db($b);
$sql_temp = "select * from test";
//.^^^^
$result = mssql_query("$sql_temp");
// ^^^^^^^^^^
//??????
mssql_close($connexion);
?>
Here is the problem $sql != $sql_temp
so the $result = NULL; because mssql_query(" ") has no query to send to the
MsSQL server.
This should work try it out!!!
Thomas "omega" Henning