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