#43573 [Opn->Asn]: mysql_fetch_object: Insufficient documentation of optional parameter
| From: | felipe@php.net | Date: | Wed, 12 Dec 2007 10:26:22 +0000 |
| Subject: | #43573 [Opn->Asn]: mysql_fetch_object: Insufficient documentation of optional parameter | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-346@lists.php.net to get a copy of this message | ||
ID: 43573
Updated by: felipe@php.net
Reported By: me at signpostmarv dot name
-Status: Open
+Status: Assigned
Bug Type: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: felipe
New Comment:
Any class...
Example:
<?php
class foo {
public $name;
}
// connect && select db
$rs = mysql_query('SELECT name FROM languages LIMIT 1');
$obj = mysql_fetch_object($rs, 'foo');
var_dump($obj);
?>
Output:
object(foo)#1 (1) { ["name"]=> string(3) "php" }
----
I'll add one example for that parameter, thanks.
Previous Comments:
------------------------------------------------------------------------
[2007-12-12 01:46:38] me at signpostmarv dot name
Description:
------------
the documentation defines the class_name parameter as: "The name of the
class to instantiate, set the properties of and return. If not
specified, a stdClass object is returned."
However, there is nothing in the documentation which suggests how to
construct such a class.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43573&edit=1