note 81110 added to function.odbc-field-name

From: Date: Thu, 14 Feb 2008 14:08:09 +0000
Subject: note 81110 added to function.odbc-field-name
Groups: php.notes 
Request: Send a blank email to php-notes+get-136145@lists.php.net to get a copy of this message
we faced the 31 char limit using cakephp dbo_odbc.php class (version 1.1.18.5850) at the end, it calls odbc_fetch_row giving the problem (i tracked it may be due to the php implementation of a ODBCv2 model, which has hard coded 4bytes, 32 bits file names length, while ODBCv3 seems to have a separate specification of that value, fwiw) we learned from another user (having similar problems with dbo_mssql.php class) how to workaround this problem, we solved using inheritance, redefining the method (locally to our application) in order to - create a "map" of the query fields (as an array) before executing it - execute the query in a non-associative way - after the results are returned, restore the real field names applying the previous created "map" another way could be use the COM like: new COM("ADODB.Connection") which does not show the 31 chars problem but it could be slower and bound to the windows platform. ---- Server IP: 80.241.173.254 Probable Submitter: 82.112.219.246 ---- Manual Page -- http://www.php.net/manual/en/function.odbc-field-name.php Edit -- https://master.php.net/note/edit/81110 Del: integrated -- https://master.php.net/note/delete/81110/integrated Del: useless -- https://master.php.net/note/delete/81110/useless Del: bad code -- https://master.php.net/note/delete/81110/bad+code Del: spam -- https://master.php.net/note/delete/81110/spam Del: non-english -- https://master.php.net/note/delete/81110/non-english Del: in docs -- https://master.php.net/note/delete/81110/in+docs Del: other reasons-- https://master.php.net/note/delete/81110 Reject -- https://master.php.net/note/reject/81110 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136145) next »