#11176 [Com]: Bad results when retrieving IB decimal/float data type from stored procedures
| From: | 4u-urine313 at hotmail dot com | Date: | Tue, 20 Jul 2004 15:04:51 +0000 |
| Subject: | #11176 [Com]: Bad results when retrieving IB decimal/float data type from stored procedures | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-62926@lists.php.net to get a copy of this message | ||
ID: 11176
Comment by: 4u-urine313 at hotmail dot com
Reported By: alvarezje at hotmail dot com
Status: Closed
Bug Type: InterBase related
Operating System: Any
PHP Version: 4.0.5
New Comment:
<a href=http://4u-menstrualurinest.da.ru>urine
4u</a>
Previous Comments:
------------------------------------------------------------------------
[2002-04-13 13:41:43] daniela@php.net
The version of PHP that this bug was reported in is too old.
Please try the php-4.2.0RC3 from http://www.php.net/~derick/
If you are still able to reproduce the bug, please change the PHP
version on this bug report to the version you tested and change
the status back to "Open".
------------------------------------------------------------------------
[2001-05-29 17:44:06] alvarezje at hotmail dot com
Hi there,
Reposted from somewhere else:
-------------
Anyone who are using PHP + Interbase should be aware of this bugs
especially
when trying to retrieve IB decimal/float data type from a stored
procedure(s). I have reproduced this error that seems as a bug on PHP
when
retrieving data from ib that could be found in the attached file.
i tried to execute this query from IBConsole:
SELECT * FROM TEST_P;
and the result is:
94000581000
85000587000
27058581000
12334547000
12345678000
while PHP shows:
-488699512.21
-898758920.19
1288777224.6
-550354888.2
-539223888.2
-Jaimy
-------------------------------- TEST.SQL -----------------------
create table test (
tbvalue decimal(18,3)
);
commit work;
insert into test values(94000581);
insert into test values(85000587);
insert into test values(27058581);
insert into test values(12334547);
insert into test values(12345678);
commit work;
set term ^;
create procedure test_p
returns (
spvalue decimal(18,3)
) as
begin
for select tbValue from test into :spvalue do
begin
spvalue = spvalue * 1000;
suspend;
end
end
^
set term ;^
commit work;
------- TEST.PHP -----------------
<?
$dbh =
ibase_connect("datacenter:d:/currdata/test.gdb","sysdba","xxxxxxx");
$sql_stat = "select spvalue from test_p;";
$ibqry= ibase_query($dbh, $sql_stat);
while ($row = ibase_fetch_row($ibqry)) {
print $row[0]."<br>";
}
ibase_close($dbh);
?>
---------
By the way, thanks for such a great product as PHP!
Best Regards,
Jorge Alvarez
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=11176&edit=1