[PHP-DEV] PHP 4.0 Bug #3724: mysql_connect() return value ?(Integer):(MySQL Resource ID) From: ahsiu <email protected>
Date: 03/03/00

From: ahsiu <email protected>
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 ??

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>