|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-18 21:49 UTC] tony2001@php.net
[2005-11-21 17:51 UTC] tawood at vlsmaps dot com
[2005-11-21 18:26 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 11:00:01 2025 UTC |
Description: ------------ I have php 5.0.5, apache 2.0.55 and oci8-beta 1.1.1. BINARY_FLOAT data types in 10g are always returned as a null value in php. I have made sure that the values are there via SQL*Plus and the Enterprise Manager. In the below example, the output of the binary_float column is empty. The obvious work around to this is to use a NUMBER data type. Reproduce code: --------------- ------------ $oraDb = oci_connect("YOUR_SCHEMA","password","TNSNAME"); $oraCreate = 'CREATE TABLE binf_test (bt_idx INTEGER, reg_float NUMBER (10, 3), bin_float BINARY_FLOAT, CONSTRAINT bt_pk PRIMARY KEY (bt_idx))'; oci_execute(oci_parse($oraDb, $oraCreate)); for($i=0;$i<10;$i++) { $decnum = ($i / (.429)); $oraInsert = "INSERT INTO binf_test VALUES (".$i.", ".$decnum.", ".$decnum.")"; oci_execute(oci_parse($oraDb, $oraInsert)); } $oraSelect = "SELECT * FROM binf_test"; $oraParse = oci_parse($oraDb, $oraSelect); if (oci_execute($oraParse)) { while ($oraRow = oci_fetch_assoc($oraParse)) { foreach ($oraRow as $key => $val) { echo $key." : ".$val."<br />\n"; } } } oci_close($oraDb); Expected result: ---------------- The correct values of binary_float columns to be displayed.