Bug #69498 [NEW]: odbc_fetch_array returns field values in array keys
From: asears at conestogawood dot com
Operating system: Linux (Gentoo Base 2.2/Kernel 4)
PHP version: 5.5.24
Package: ODBC related
Bug Type: Bug
Bug description:odbc_fetch_array returns field values in array keys
Description:
------------
Using PHP-5.5.24, unixODBC 2.3.2, IBM iSeriesAccess 1.1.0.2
odbc_fetch_array returns the field values as the array keys instead of
the column names as expected.
Test script:
---------------
$odbc = odbc_connect('AS400', '', '');
$result = odbc_exec($odbc, "SELECT * FROM SYSIBM.SYSCHARSETS");
var_dump(odbc_fetch_array($result));
Expected result:
----------------
(result using PHP-5.5.23)
array(4) {
["CHARACTER_SET_SCHEMA"]=>
string(18) "INFORMATION_SCHEMA"
["CHARACTER_SET_NAME"]=>
string(8) "SQL_TEXT"
["DEFAULT_COLLATE_SCHEMA"]=>
string(18) "INFORMATION_SCHEMA"
["DEFAULT_COLLATE_NAME"]=>
string(8) "SQL_TEXT"
}
Actual result:
--------------
(result using PHP-5.5.24)
array(2) {
["INFORMATION_SCHEMA"]=>
string(18) "INFORMATION_SCHEMA"
["SQL_TEXT"]=>
string(8) "SQL_TEXT"
}
--
Edit bug report at https://bugs.php.net/bug.php?id=69498&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69498&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69498&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69498&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69498&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69498&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69498&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69498&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69498&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69498&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69498&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69498&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69498&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69498&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69498&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69498&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69498&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69498&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69498&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69498&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69498&r=mysqlcfg
Thread (4 messages)
- asears at conestogawood dot com