#23316 [Fbk->Opn]: Loss of precision in float data when SQL Server is queried

From: Date: Wed, 23 Apr 2003 21:20:31 +0000
Subject: #23316 [Fbk->Opn]: Loss of precision in float data when SQL Server is queried
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38234@lists.php.net to get a copy of this message
ID: 23316 User updated by: hammer88 at hotmail dot com Reported By: hammer88 at hotmail dot com -Status: Feedback +Status: Open Bug Type: MSSQL related Operating System: Windows 2000 -PHP Version: 4.3.1 +PHP Version: 4.3.2-RC New Comment: Replaced the php.exe & php4ts.dll files and verified the new version with phpinfo(). But problem still persisted. Is this because php utilizes the local computer's currency settings? Which I assume default for Windows is two decimal places? That wouldn't be cool to have to change that default just for this instance... ideas? Previous Comments: ------------------------------------------------------------------------ [2003-04-23 11:02:01] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-04-23 10:06:11] hammer88 at hotmail dot com I created a query and tested in SQL Server Query Analyzer. The query returns a number that is stored as 1.0947 as data type money to 8 digits. But when I run this query from PHP $dbTradeRow=mssql_fetch_object($trades_result) to retrieve the data and check that column, it returns only 1.09 and i loose the last two digits. Can somebody please help me out? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23316&edit=1

« previous php.bugs (#38234) next »