|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-05-07 18:16 UTC] sixd@php.net
-Status: Open
+Status: Not a bug
-Package: *General Issues
+Package: OCI8 related
-Assigned To:
+Assigned To: sixd
[2015-05-07 18:16 UTC] sixd@php.net
[2015-05-07 18:21 UTC] sixd@php.net
[2015-05-11 10:36 UTC] vavra at 602 dot cz
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 11:00:01 2025 UTC |
Description: ------------ Lets consider this table create table test_division(a number, b number); with values insert into test_division values (21, 2); and this query select a, b, a/b division, 21/2 constant_division from test_division leads to result in our system { 'A' => double(21) 'B' => double(2) 'DIVISION' => int(10) 'CONSTANT_DIVISION' => double(10.5) } The problem is that oci_field_scale(., 'DIVISION') returns 0. (Note: for 'CONSTANT_DIVISION' returns -127). In our system we decide according to the oci_field_scale result, if to call intval or floatval on column value. OCI driver returns always string values and we need to convert them. Oracle version is Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production, Windows. Expected result: ---------------- oci_field_scale(., 'DIVISION') should return 1, or -127 (as says documentation: For FLOAT columns, precision is nonzero and scale is -127.) Actual result: -------------- 0