PHP 4.0 Bug #3724: mysql_connect() return value ?(Integer):(MySQL Resource ID)
| From: | ahsiu at ahsiu dot xfiles dot to | Date: | Sat, 04 Mar 2000 04:26:39 +0000 |
| Subject: | PHP 4.0 Bug #3724: mysql_connect() return value ?(Integer):(MySQL Resource ID) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-16384@lists.php.net to get a copy of this message | ||
From: ahsiu@ahsiu.xfiles.to
Operating system: FreeBSD 3.3 Release
PHP version: 4.0 Beta 4 Patch Level 1
PHP Bug Type: MySQL related
Bug description: mysql_connect() return value ?(Integer):(MySQL Resource ID)
The following is part of my PHP code
<?php
$linkid=mysql_connect("mysite.domain","name","passwd");
echo "link id: ".$linkid."<br>";
if($linkid==false){
echo "failed to connect to database";
exit();
}
?>
The Result is:
link id: Resource id #1
failed to connect to database.
Why $linkid echos "Resource id #1" and is also equal to
false value ??
I've checked the manual to see what type the
mysql_connect() returns and it's "int".
What exactly the type of returned type of mysql_connect()
is ??