ID: 8656
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: MySQL related
Assigned To: 
Comments:

Fixed in CVS.

--Jani

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

[2001-01-11 11:38:39] [EMAIL PROTECTED]
configure line:
quick install

script:
for ($i = 0; ($row = mysql_fetch_object($results)) != false;
$i++) {
        foreach ($row as $key => $value) {
                $orders[$i][$key] = $value;
        }
}
foreach($orders as $value) {
        foreach($value as $key => $here) {
                echo "key = $key, value = ".$value[$key]."n";
        }
}

will produce
key = 0, value = first value
key = database_column, value = first value
key = 1, value = second value
key = database_column, value = second value
...

description:
This is basically reproducing the column in a numbered and
named row in the returned array.

This is against the documentation that states that we can
only access the values by the column name because numbers
are illegal property names.  It seems to me that the default
is MYSQL_BOTH but that by the documentation that isn't true.
 By the documentation it seems to me that the default is
MYSQL_ASSOC.

I posted a note to the page to always use MYSQL_ASSOC/NUM as
the result_type.

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


Full Bug description available at: http://bugs.php.net/?id=8656


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to