ID: 32180
Updated by: [EMAIL PROTECTED]
Reported By: snirh at inag dot pt
-Status: Open
+Status: Feedback
Bug Type: *Database Functions
Operating System: WINDOWS SERVER 2003
PHP Version: 4.3.10
New Comment:
What does 'var_dump($result);' output?
Previous Comments:
------------------------------------------------------------------------
[2005-03-03 19:59:33] snirh at inag dot pt
Description:
------------
Using OCI libs to return values from a database, if this values is
negative floating point the result cannot be used as number!
Reproduce code:
---------------
$sql = "SELECT (-3/5) AS floatp FROM dual";
$conn2 = ocilogon("login", "pass", $srvc);
$stmt = ociparse($conn2, $sql);
ociexecute($stmt, OCI_DEFAULT);
while (ocifetch($stmt)) {
echo $result = ociresult($stmt, "FLOATP")."\n\n";
}
echo $result + 2;
// This code return 2!!
Expected result:
----------------
1.4
Actual result:
--------------
2
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32180&edit=1