|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-03-09 12:57 UTC] tony2001@php.net
[2005-03-16 01:05 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 12:00:01 2025 UTC |
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