#28897 [Opn->Csd]: fetching rows, from a numeric(18,4) column gives wrong value when value is -1
ID: 28897
Updated by: abies@php.net
Reported By: john at ceressoft dot nl
-Status: Open
+Status: Closed
Bug Type: InterBase related
Operating System: Linux, 2.6.6
-PHP Version: 4.3.7
+PHP Version: 4.3.7/5.0.0-dev
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-06-23 18:58:27] john at ceressoft dot nl
Description:
------------
fetching rows, from a numeric(18,4) column gives wrong value (-0.0000)
when value is -1
I verified this with iboconsole, and i can see that the correct value
is in the database and iboconsole also returns the correct value.
Reproduce code:
---------------
<?php
$db = ibase_connect("server:/mydb.fdb", "SYSDBA", "mypass");
if ($db)
$q = ibase_query($db, "select * from test");
if($q)
while($row = ibase_fetch_row($q))
var_dump($row);
?>
Test table:
CREATE TABLE TEST
(
testcol numeric(18,4)
);
Expected result:
----------------
-1.0000
Actual result:
--------------
-0.0000
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28897&edit=1
Thread (2 messages)