|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-03-29 13:24 UTC] fmk@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 10:00:01 2025 UTC |
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