ID: 27743 Updated by: [EMAIL PROTECTED] Reported By: pixyteam at netscape dot net -Status: Open +Status: Assigned Bug Type: MSSQL related Operating System: Windows 2000 Server PHP Version: 4.3.5 -Assigned To: +Assigned To: fmk
Previous Comments: ------------------------------------------------------------------------ [2004-03-29 00:46:19] pixyteam at netscape dot net Description: ------------ a float value in DB is 3.6000 with PHP 4.3.4 is work O.K. with PHP 4.3.5 isn't. Reproduce code: --------------- ex1: $sql = "SELECT cost FROM buy WHERE buyid '20040329000001'"; $qid = mssql_query($sql,$lid); $a = mssql_fetch_object($qid); echo sprintf("%.2f",$a->cost); exit(); ex2: change $sql is ok. $sql = "SELECT CONVERT(varchar,cost) AS cost FROM buy WHERE buyid '20040329000001'"; other lines same as ex1. Expected result: ---------------- ex1: in 4.3.4 -> 3.60 in 4.3.5 -> 3.60 ex2: in 4.3.4 -> 3.60 in 4.3.5 -> 3.60 Actual result: -------------- ex1. in 4.3.4 -> 3.60 in 4.3.5 -> 5.04467447157E-041 ex2. in 4.3.4 -> 3.60 in 4.3.5 -> 3.60 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27743&edit=1