ID:               45039
 Updated by:       [EMAIL PROTECTED]
 Reported By:      smelban at norwood dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Oracle related
 Operating System: Windows 2003 Enterprise Server
 PHP Version:      5.2.6
 New Comment:

Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php



In your version of OCI8 you don't have the fix for
http://bugs.php.net/bug.php?id=41917

(i) try testing with PHP 5.2.6+ from php.net
(ii) ping Zend about updating OCI8 in ZCO (this is planned, but the
schedule might have changed recently)


Previous Comments:
------------------------------------------------------------------------

[2008-05-20 17:07:51] smelban at norwood dot com

I've connected my code to both an 10g and 11g database the they both
are returning the same incorrect data.  Is there a way for me to debug
what is actually being returned? 

I've looked in the all_tab_columns table in both a 10g and 11g
databases and the information is correct.  I'm also looking at a
VARCHAR2  field that returns 0 as the field size.  In the table it shows
it as a 18 char string but both ocicolumnscale(..) and
ocicolumnprecision(..) return 0 and 0;

I've found a workaround for myself by querying the the all_tab_columns
table but that is just a work around.  I 100% certain this worked months
back but only assumed it was the 11g issue.  I'm not quite sure how to
proceed on finding out what is wrong.

Oracle Client
10.2.0

Oracle Server
Windows 2003 Enterprise Server 32 Bit

OCI8 Info
Revision is: $Revision: 1.269.2.16.2.30 $
Version: 1.2.3

------------------------------------------------------------------------

[2008-05-20 15:58:23] [EMAIL PROTECTED]

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

Reply via email to