#29867 [Opn]: mysqli_result->fetch_array() differs from Documentations
| From: | faxe at neostrada dot pl | Date: | Fri, 27 Aug 2004 13:48:09 +0000 |
| Subject: | #29867 [Opn]: mysqli_result->fetch_array() differs from Documentations | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-65356@lists.php.net to get a copy of this message | ||
ID: 29867
User updated by: faxe at neostrada dot pl
Reported By: faxe at neostrada dot pl
Status: Open
Bug Type: MySQL related
Operating System: Windows 5.1 32bit
PHP Version: 5.0.1
New Comment:
Actual & Exptected fields switched their values in this Bugreport
Previous Comments:
------------------------------------------------------------------------
[2004-08-27 15:35:41] faxe at neostrada dot pl
Description:
------------
mysqli_result->fetch_array() uses MYSQLI_ASSOC as default argument. Not
MYSQLI_BOTH like Documentation claims.
Reproduce code:
---------------
<?php
$foo = $_mysqli->query('SELECT 1 AS bar');
$arr = $foo->fetch_array();
print_r($arr);
// $arr contains only 'bar' key
?>
Expected result:
----------------
Array
(
[bar] => 1
)
Actual result:
--------------
Array
(
[0] => 1
[bar] => 1
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29867&edit=1