|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-10-26 20:46 UTC] quelch at udel dot edu
Description: ------------ Utilizing the oci_bind_array_by_name function in Oracle 10.2.0.1 results in incorrect data being returned for NUMBER array data. This error also occurs with the php5.2-200610261830 snapshot. Configure line: ./configure -with-oci8 --with-gd --enable-gd-imgstrttf --enable-gd-native-ttf --with-ttf --with-freetype-dir --with-apxs=/www/bin/apxs --with-png --with-zlib --with-jpeg --enable-xmlwriter --without-pear My database is set up with native code compile option for PL/SQL in case that makes a difference. Reproduce code: --------------- The code used can be found here: http://www-dev.quelch.org/ws/test.html Expected result: ---------------- Array ( [0] => 4 [1] => 3 [2] => 2 [3] => 1 [4] => 0 ) Actual result: -------------- Array ( [0] => 1473 [1] => 1217 [2] => 961 [3] => 705 [4] => 128 ) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 07:00:01 2025 UTC |
However, if you have a column defined, say, as number (4,2) and place decimal values in it, you can't then get this data out using the "SQLT_INT" constant, as it truncates. I've updated my test case to do that at the link below. In this case, using SQLT_NUM gives me: Array ( [0] => 2688449 [1] => 2032833 [2] => 1377217 [3] => 721601 [4] => 128 ) Where I should get Array ( [0] => 4.4 [1] => 3.3 [2] => 2.2 [3] => 1.1 [4] => 0 ) Using the SQLT_INT constant gets me: Array ( [0] => 4 [1] => 3 [2] => 2 [3] => 1 [4] => 0 ) Which is not right either.