#34352 [Csd->Bgs]: mysqli_connect erroneous example 2
| From: | vrana@php.net | Date: | Sat, 03 Sep 2005 08:00:16 +0000 |
| Subject: | #34352 [Csd->Bgs]: mysqli_connect erroneous example 2 | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969369846@lists.php.net to get a copy of this message | ||
ID: 34352
Updated by: vrana@php.net
Reported By: sr at brightlight dot ch
-Status: Closed
+Status: Bogus
Bug Type: Documentation problem
Operating System: *
PHP Version: Irrelevant
New Comment:
Thus not a bug.
Previous Comments:
------------------------------------------------------------------------
[2005-09-03 05:17:49] sr at brightlight dot ch
More careful reading would have helped. I was too used with
the result beeing of type resource and not object (which didnt
make sense to me just for a link).
Sorry for the inconvenience.
------------------------------------------------------------------------
[2005-09-03 05:00:26] sr at brightlight dot ch
I'd also like to point out that in the mysqli documentation
there is a lot of talk about using procedural style with a
link-resource. There is no way to actually retrieve the link-
resource. At least none is given in the manual. There is no
property, mysqli_connect doesnt return one and there is no
documented method for it.
------------------------------------------------------------------------
[2005-09-02 21:32:38] sr at brightlight dot ch
Description:
------------
Quote from http://php.benscom.com/manual/en/function.mysqli-
connect.php:
Example 2. Procedural style
<?php
$link = mysqli_connect("localhost", "my_user",
"my_password", "world");
/* check connection */
if (!$link) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
...
?>
This leads to the wrong assumption mysqli_connect would
return a link resource which it doesnt.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34352&edit=1