Plz help beginner
| From: | Adrain Sweeney | Date: | Wed, 02 Aug 2000 11:49:59 +0000 |
| Subject: | Plz help beginner | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-1472@lists.php.net to get a copy of this message | ||
Hi I have just started with php an am having a problem with opening an odbc
data source
The database behind the DSN is MSsql7.0
when I use the following commands
<code>
<?
$connect = odbc_connect("myDSN","sa","");
if(!$connect) {
echo ("Not Connected!");
} else {
echo ("Connected! [$connect]");
}
?>
</code>
<output>
Connected! [Resource id #1]
</output>
my first question is why is $connect = Resource id #1
and not equal to the value 1
my second question is why does the following code stop the WEB server in
this case iis4.0
<code>
<?
$connect = odbc_connect("myDSN","sa","");
if(!$connect) {
echo ("Not Connected!");
} else {
echo ("Connected! [$connect]");
$x = odbc_exec($connect,"Select * from homeinsure");
print "[$x]";
}
?>
</code>
Adrain Sweeney