#25279 [NEW]: real numbers get twisted
| From: | t dot noest at noestnet dot nl | Date: | Wed, 27 Aug 2003 19:04:55 +0000 |
| Subject: | #25279 [NEW]: real numbers get twisted | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-46784@lists.php.net to get a copy of this message | ||
From: t dot noest at noestnet dot nl
Operating system: winnt
PHP version: 4.3.3
PHP Bug Type: MSSQL related
Bug description: real numbers get twisted
Description:
------------
I just installed PHP4.3.3, the binary windows build, on my winnt machine.
Something is going wrong with the real numbers I put in the MSSQL 7
database(fieldtype = "real").
I save for instance the number 7.02: "UPDATE Teksten SET Volgorde_nummer =
7.02 WHERE RecID = 220"
MSSQLServer say's the value in the database is 7.02.
When pulled back by PHP: "SELECT * FROM Teksten WHERE RecID = 220"
$rs = mssql_query($SQL);
$k = mssql_fetch_array($rs);
echo $k['Volgorde_nummer'];
give's me : 7.01999998093
And worse:
"UPDATE Teksten SET Volgorde_nummer = 7.01 WHERE RecID = 220"
Now MSSQLServer say's the value in the database is 7.0100002.
echo $k['Volgorde_nummer'];
give's me : 7.01000022888
I got the newest mssql.dll from the zip distribution. But it doesn't make
any difference.
I have had these problems with almost every new version of PHP I install!
--
Edit bug report at http://bugs.php.net/?id=25279&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25279&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25279&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25279&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25279&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25279&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25279&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25279&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25279&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25279&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25279&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25279&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25279&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25279&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25279&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25279&r=gnused