ID: 44003
Comment by: netvbonline at yahoo dot co dot uk
Reported By: tceverling at yahoo dot co dot uk
Status: Open
Bug Type: ODBC related
Operating System: Windows XP SP2
PHP Version: 5.2.5
New Comment:
This is over a year old? Has anyone been able to fix as I am using
latest version of PHP as of 17 Apr 2009 with dynamic queries and just
encountered this issue
Many Thanks :-))
Previous Comments:
------------------------------------------------------------------------
[2008-01-31 18:17:50] tceverling at yahoo dot co dot uk
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 this bug report at http://bugs.php.net/?id=44003&edit=1