ID:               41917
 Updated by:       [EMAIL PROTECTED]
 Reported By:      nobleclem+phpbugs at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         OCI8 related
 Operating System: Solaris
 PHP Version:      5.2.3
 New Comment:

PHP/OCI8 returns exactly what it got from OCIAttrGet(..,
OCI_DTYPE_PARAM, .., .., OCI_ATTR_SCALE, ).
If Oracle Client returns wrong information, we can't change or fix
that.


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

[2007-07-06 18:40:17] nobleclem+phpbugs at gmail dot com

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 this bug report at http://bugs.php.net/?id=41917&edit=1

Reply via email to