From:             pixyteam at netscape dot net
Operating system: Windows 2000 Server
PHP version:      4.3.5
PHP Bug Type:     MSSQL related
Bug description:  mssql_fetch_object with float

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 bug report at http://bugs.php.net/?id=27743&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27743&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27743&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27743&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27743&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27743&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27743&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27743&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27743&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27743&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27743&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27743&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27743&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27743&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27743&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27743&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27743&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27743&r=float

Reply via email to