php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #16187 mysql_fetch_object docs
Submitted: 2002-03-20 10:57 UTC Modified: 2002-03-20 17:21 UTC
From: manuzhai at xavamedia dot nl Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.1.2 OS:
Private report: No CVE-ID: None
 [2002-03-20 10:57 UTC] manuzhai at xavamedia dot 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

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-20 12:41 UTC] 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 15:50 UTC] manuzhai at xavamedia dot 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 16:49 UTC] alindeman@php.net
I guess see what you're saying.  The documentation kind of contradicts itself.  Now, which part is wrong?

 [2002-03-20 17:21 UTC] cnewbill@php.net
Fixed in CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Aug 18 19:01:28 2024 UTC