From: nobleclem+phpbugs at gmail dot com
Operating system: Solaris
PHP version: 5.2.3
PHP Bug Type: OCI8 related
Bug description: oci_field_scale returns expected value multiplied by 256
Description:
------------
When using oci_field_scale to obtain the value stored in
all_tab_columns.data_scale in oracle for a field the value returned is that
in all_tab_columns.data_scale multiplied by 256.
Reproduce code:
---------------
Assumptions:
- field #2 is of type NUMBER(12,2)
- all_tab_columns.data_precision is 12
- all_tab_columns.data_scale value is 2
Code:
$conn = oci_connect('username', 'password');
$stmt = oci_parse($conn, "SELECT * FROM fees");
oci_execute($stmt);
$field_number = 2;
$scale = oci_field_scale( $stmt, $field_number );
Expected result:
----------------
$scale should be assigned the value of 2.
Actual result:
--------------
$scale is assigned the value of 512.
--
Edit bug report at http://bugs.php.net/?id=41917&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=41917&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=41917&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=41917&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41917&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=41917&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41917&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41917&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41917&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41917&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41917&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=41917&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=41917&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41917&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41917&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41917&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41917&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41917&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41917&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41917&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41917&r=mysqlcfg