#45039 [Opn->Fbk]: OCI get number column length returns zero (0)

From: Date: Tue, 20 May 2008 15:58:44 +0000
Subject: #45039 [Opn->Fbk]: OCI get number column length returns zero (0)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-125148@lists.php.net to get a copy of this message
ID: 45039 Updated by: sixd@php.net Reported By: smelban at norwood dot com -Status: Open +Status: Feedback Bug Type: Oracle related Operating System: Windows 2003 Enterprise Server PHP Version: 5.2.6 Previous Comments: ------------------------------------------------------------------------ [2008-05-20 15:58:23] sixd@php.net What's the version of the Oracle client libraries used by PHP? What platform is the DB on? Are client/server 32bit or 64bit? What does phpinfo() show for the OCI8 "Revision"? (The problem could be related to http://bugs.php.net/bug.php?id=41917) ------------------------------------------------------------------------ [2008-05-19 19:00:25] smelban at norwood dot com Description: ------------ We just recently upgraded from Oracle 10g to Oracle 11g. Since that move the ocicolumnscale and ocicolumnprecision functions have stopped returning the column length. Windows 2003 Enterprise Server Zend Core 2.5.0 PHP 5.2.5 Reproduce code: --------------- // mynumber field is a 10,4 decimal $sql = "SELECT mynumber FROM TABLENAME"; $R = OCIParse($c, $sql); OCIExecute($R); while (OCIFetch($R)) { $column_type = ocicolumntype($R, $i); if( $column_type == "NUMBER" ) { print ocicolumnscale($R, $i ) . "\n"; print ocicolumnprecision($R, $i ) . "\n"; } } Expected result: ---------------- Should Return 10 4 Actual result: -------------- Returns 0 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45039&edit=1

« previous php.bugs (#125148) next »