#27743 [Asn->Csd]: mssql_fetch_object with float

From: Date: Mon, 29 Mar 2004 18:24:35 +0000
Subject: #27743 [Asn->Csd]: mssql_fetch_object with float
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-57042@lists.php.net to get a copy of this message
ID: 27743 Updated by: fmk@php.net Reported By: pixyteam at netscape dot net -Status: Assigned +Status: Closed Bug Type: MSSQL related Operating System: Windows 2000 Server PHP Version: 4.3.5 Assigned To: fmk New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. 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

« previous php.bugs (#57042) next »