#44003 [NEW]: odbc_fetch_array returns truncated field names

From: Date: Thu, 31 Jan 2008 18:17:50 +0000
Subject: #44003 [NEW]: odbc_fetch_array returns truncated field names
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-121837@lists.php.net to get a copy of this message
From: tceverling at yahoo dot co dot uk Operating system: Windows XP SP2 PHP version: 5.2.5 PHP Bug Type: ODBC related Bug description: odbc_fetch_array returns truncated field names Description: ------------ After executing a "SELECT" SQL query and then doing an odbc_fetch_array(), field names longer than 31 characters gets truncated. Reproduce code: --------------- <?php $link = odbc_connect('MYSQL', '', ''); // Connect to MySQL $res = odbc_exec($link, 'select * from test'); var_dump(odbc_fetch_array($res)); $link = odbc_connect('Access', '', ''); // Connect to Microsoft Access $res = odbc_exec($link, 'select * from test'); var_dump(odbc_fetch_array($res)); ?> Expected result: ---------------- Assuming that a field name within the table test is '1234567890123456789012345678901234567890', expected result maybe like: array(1) { ["1234567890123456789012345678901234567890"]=> string(1) "1" } array(1) { ["1234567890123456789012345678901234567890"]=> string(1) "1" } Actual result: -------------- array(1) { ["1234567890123456789012345678901"]=> string(1) "1" } array(1) { ["1234567890123456789012345678901"]=> string(1) "1" } -- Edit bug report at http://bugs.php.net/?id=44003&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=44003&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44003&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44003&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44003&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44003&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44003&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44003&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44003&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44003&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44003&r=support Expected behavior: http://bugs.php.net/fix.php?id=44003&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44003&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44003&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44003&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=44003&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=44003&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44003&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44003&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44003&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44003&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44003&r=mysqlcfg

« previous php.bugs (#121837) next »