#22341 [NEW]: Strange Rounding Problem with Money Fields

From: Date: Thu, 20 Feb 2003 23:26:00 +0000
Subject: #22341 [NEW]: Strange Rounding Problem with Money Fields
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-33762@lists.php.net to get a copy of this message
From: ryanphpb at ryanjameson dot com Operating system: windows 2000 PHP version: 4.3.1 PHP Bug Type: Sybase-ct (ctlib) related Bug description: Strange Rounding Problem with Money Fields There's an old report #13807 that sounds similar to what I'm experiencing. The issue is that a value of 11.16 is coming back in my result array as 11. Other values in the same field in the same result are coming back fine, ie... the previous value was 111.6. So for some reason this field is rounding wrong but just for this value. When I look at it through ODBC with MS Access I see 11.16. -------------------------------- $q = "select producthandle.sellingprice from customerorder, producthandle where producthandle.id = customerorder.nr and customerorder.nr = '030216-22782' and class='CO'"; $con = sybase_connect("#server#","#user#","#password#"); $rs = sybase_query($q,$con); while ($ar=sybase_fetch_array($rs)){ echo $ar['sellingprice'] . "<br>"; } ------------------------ OUTPUT: 111.6 11 33.4 555.3 12.31 1.23 ------------------------ The 11 should be 11.16... The field type is native sybase money. -- Edit bug report at http://bugs.php.net/?id=22341&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22341&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22341&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22341&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22341&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22341&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22341&r=support Expected behavior: http://bugs.php.net/fix.php?id=22341&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22341&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22341&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22341&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22341&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22341&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22341&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22341&r=gnused

« previous php.bugs (#33762) next »