ID: 30043 Updated by: [EMAIL PROTECTED] Reported By: arobins at csg dot uwaterloo dot ca Status: Open Bug Type: Feature/Change Request Operating System: * PHP Version: 4CVS, 5CVS New Comment:
You could try PDO + PDO_ODBC as an alternative. Previous Comments: ------------------------------------------------------------------------ [2005-10-24 17:55:28] [EMAIL PROTECTED] As stated in a private email, the biggest issue with such a change is how much it effects other databases beyond those that you have used. It's a simple change, but it's unknown what databases will fail with this. ------------------------------------------------------------------------ [2005-10-19 20:46:04] arobins at csg dot uwaterloo dot ca It's been over a year since my original submission, and I was wondering if it would be at all possible for someone to implement an increase in the field name buffer from 32 to 256? Only one line needs to be changed to accomplish this, in ext\odbc\php_odbc_includes.h: line 217: char name[32]; -> char name[256]; If it is at all possible for someone to make this minor modification for me, I would be extremely grateful! ------------------------------------------------------------------------ [2004-11-03 16:52:01] arobins at csg dot uwaterloo dot ca Until 'true multi-byte support' comes along, might I suggest as a temporary solution simply increasing the field name buffer? (i.e. from 32 to 256) ------------------------------------------------------------------------ [2004-09-10 03:23:40] [EMAIL PROTECTED] Known issue. Was once looked into correct to provide true multi-byte support, but was side tracked. ------------------------------------------------------------------------ [2004-09-09 22:08:24] arobins at csg dot uwaterloo dot ca Description: ------------ When retrieving ODBC results from Sybase SQL Anywhere 6 and 9, the column names are being truncated to 31 characters. This happens even if the column name is simply specified using sql 'AS' (i.e. "select column as a_really_long_name_that_is_longer_than_31_characters from crap" would still return "a_really_long_name_that_is_long" as the column name). Have tried in PHP 4 and 5, Win2K Server and SUSE Linux, all with same results. -- The buffer used by the odbc extension to store field names is only 32 bytes. Reproduce code: --------------- <?php $DBN = 'thedbn'; $UID = 'theuid'; $PWD = 'thepws'; $CONN = odbc_connect( $DBN, $UID, $PWD ) or die( "Cannot connect to $DBN."); $sql = "select * from crap"; $result = odbc_exec( $CONN, $sql ); for( $i = 1 ; $i <= odbc_num_fields( $result ) ; $i++ ) { $name = odbc_field_name( $result, $i ); ${$name} = odbc_result( $result, $name ); print( "$i: $name - ${$name}\n" ); } ?> Expected result: ---------------- 1: key - 4 2: a_really_long_name_that_is_longer_than_31_characters - 5 3: longer_name - 6 Actual result: -------------- 1: key - 4 2: a_really_long_name_that_is_long - 5 3: longer_name - 6 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30043&edit=1