ID:               47755
 Updated by:       [email protected]
 Reported By:      jbricci at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         *General Issues
 Operating System: Windows
 PHP Version:      5.2.9
 New Comment:

The return value of mysqli_connect() is an object, not a resource.
Please read the documentation for mysqli more carefully


Previous Comments:
------------------------------------------------------------------------

[2009-03-23 19:23:30] jbricci at gmail dot com

Description:
------------
get_resource_type() returns bool false on a valid resource handle.

Reproduce code:
---------------
<?php

$host = 'localhost';
$user = 'user';
$pass = 'pass';
$dbpn = 'database';

$connection = mysqli_connect ( $host, $user, $pass, $dbpn );

if ( ! $connection )
{
        echo 'bad connection';

        exit ();
}

var_dump ( get_resource_type ( $connection ) );

mysqli_close ( $connection );

?>



Expected result:
----------------
I expect...

string(unknown)


Because it seems that mysqli_() is not in the (List of Resource Types)
supported. But it would be nice if mysqli_() and the rest of the
database extensions that PHP supports were added to the (List of
Resource Types) supported.





Actual result:
--------------
I get..

bool(false)

[23-Mar-2009 15:07:18] PHP Warning:  Supplied argument is not a valid
resource handle in X:\http\docs\test.php on line [17]

Which clearly states that $connection is not a valid resource, when it
really is!


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47755&edit=1

Reply via email to