Bug #16187 Updated: mysql_fetch_object docs
| From: | cnewbill@php.net | Date: | Wed, 20 Mar 2002 22:21:57 +0000 |
| Subject: | Bug #16187 Updated: mysql_fetch_object docs | ||
| References: | 1 | Groups: | php.bugs php.doc |
| Request: | Send a blank email to php-bugs+get-3001@lists.php.net to get a copy of this message | ||
ID: 16187
Updated by: cnewbill@php.net
Reported By: manuzhai@xavamedia.nl
-Status: Open
+Status: Closed
Bug Type: Documentation problem
PHP Version: 4.1.2
New Comment:
Fixed in CVS.
Previous Comments:
------------------------------------------------------------------------
[2002-03-20 16:49:50] alindeman@php.net
I guess see what you're saying. The documentation kind of contradicts
itself. Now, which part is wrong?
------------------------------------------------------------------------
[2002-03-20 15:50:23] manuzhai@xavamedia.nl
Did you read the code at all? It is a documentation problem, not more,
not less. How would the parameters to this function be useful, if only
one of the possible constant values can be used?
------------------------------------------------------------------------
[2002-03-20 12:41:26] sander@php.net
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php
Anyway, it means you can use
$object->field (with the fieldnames like in mysql_fetch_array)
but not
$object->1 (like in mysql_fetch_row).
If you want more clarification to translate something correctly, ask it
on phpdoc@lists.php.net. If you just want to know how it works, ask on
php-general@lists.php.net
------------------------------------------------------------------------
[2002-03-20 10:57:18] manuzhai@xavamedia.nl
<para>
<function>mysql_fetch_object</function> is similar to
<function>mysql_fetch_array</function>, with one difference - an
object is returned, instead of an array. Indirectly, that means
that you can only access the data by the field names, and not by
their offsets (numbers are illegal property names).
</para>
<para>
The optional argument <parameter>result_type</parameter> is a
constant and can take the following values: MYSQL_ASSOC,
MYSQL_NUM, and MYSQL_BOTH. See
<function>mysql_fetch_array</function> for explanation
of these constants.
</para>
Could someone please explain this?
TIA,
Manuzhai
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16187&edit=1