#42284 [Opn]: Invalid data retrieved from numeric columns
ID: 42284
User updated by: milan dot babuskov at gmail dot com
Reported By: milan dot babuskov at gmail dot com
Status: Open
Bug Type: InterBase related
Operating System: Slackware Linux 12.0
PHP Version: 5.2.4RC1
New Comment:
Fields D5 and D6 should be D1 and D2. Sorry for the confusion.
Previous Comments:
------------------------------------------------------------------------
[2007-08-13 13:43:06] milan dot babuskov at gmail dot com
Description:
------------
PHP does not extract the values in NUMERIC(18,7) and NUMERIC(18,8)
columns correctly.
Reproduce code:
---------------
create table test ( d1 numeric(18,7), d2 numeric(18,8));
insert into test (d1,d2) values (6543210.1234567, 87654321.01234567);
commit;
<?
ibase_connect('localhost:mydb','sysdba', 'aa');
$res = ibase_query('select d5, d6 from test');
$row = ibase_fetch_row($res);
echo "D5 = ".$row[0].",\n";
echo "D6 = ".$row[1]."\n";
?>
Expected result:
----------------
D5 = 6543210.1234567,
D6 = 87654321.01234567
Actual result:
--------------
D5 = 654321.1234567,
D6 = 8765432.101234567
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42284&edit=1
Thread (5 messages)