php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3195 Decimal(6,2) values do not get retrieved properly.
Submitted: 2000-01-12 14:04 UTC Modified: 2000-07-27 00:46 UTC
From: kphannan at nscorp dot com Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.0 Beta 3 OS: Linux RH 6.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kphannan at nscorp dot com
New email:
PHP Version: OS:

 

 [2000-01-12 14:04 UTC] kphannan at nscorp dot com
The following output is the text from an HTML table with the first 2 columns being decimal(6.2) values.  The first line should have 235.00 and the first column in the second line should read 226.60.  Also the text 'from_mile' changes when refreshing the page.  This text always appears to be part of the SQL statement being executed.

 235.0ZZZZZZZZZZZZZZZZZZZZZZ 240.0 A N 
 226.59999999999999from_mile 235.0 A   
 26.699999999999999ZZZZZZZZZ 15.119999999999999 H   
 14.5 0.0 I N 
 77.0 26.699999999999999 H   
 0.0 11.699999999999999 K   
 134.69999999999999 77.0 H   
 140.0 134.69999999999999 H   
 148.24000000000001 140.0 H S 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-02-10 19:01 UTC] kphannan at nscorp dot com
The problem still exists with the Beta 3 release, but there appears to be some change in behavior.  The original SQL statement text no longer appears in the output.  Also refreshing the output maintains consistent results.
  The numbers do not include extra characters such as 'ZZZZZZZ'.  The problem seems to be rooted in the precision and rounding of the numeric value only.  For example a number that should be '148.24' is output as '148.24000000000001'
 [2000-05-22 03:49 UTC] joey at cvs dot php dot net
Do you have bcmath enabled?
What does your configure line look like?
 [2000-05-22 05:31 UTC] joey at cvs dot php dot net
Also, you might want to try turning down the precision in your php.ini, see
if that doesn't fix your problem.
 [2000-07-27 00:46 UTC] zak@php.net
Closing bug - last suggestion should fix the problem.

If it does not, please install a current release and try again.  If the error still occurs, please open a new bug report.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC