From:             john at ceressoft dot nl
Operating system: Linux, 2.6.6
PHP version:      4.3.7
PHP Bug Type:     InterBase related
Bug description:  fetching rows, from a numeric(18,4) column  gives wrong value when 
value is -1

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

Reply via email to