#20641 [Fbk->Opn]: Numeric type returns invalid result using ibase_fetch_row/ibase_fetch_object
| From: | jear at aabc dot dk | Date: | Tue, 11 Feb 2003 08:37:54 +0000 |
| Subject: | #20641 [Fbk->Opn]: Numeric type returns invalid result using ibase_fetch_row/ibase_fetch_object | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-32744@lists.php.net to get a copy of this message | ||
ID: 20641
User updated by: jear@aabc.dk
Reported By: jear@aabc.dk
-Status: Feedback
+Status: Open
Bug Type: InterBase related
Operating System: Windows NT / Firebird 1.0
PHP Version: 4.2.3
New Comment:
I've tried the CVS snapshot for Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Unfortunately the numeric/decimal datatype beyond
the bounds of the PHP integer type (> 2147483647), still causes an
overflow.
integer overflow is still there.
Previous Comments:
------------------------------------------------------------------------
[2003-02-10 13:01:59] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2002-12-22 06:04:48] jear@aabc.dk
The problem still exits after downloadning the latest PHP4 at
http://snaps.php.net/win32/php4-win32-latest.zip.
------------------------------------------------------------------------
[2002-12-21 01:00:01] php-bugs@lists.php.net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2002-12-04 22:49:33] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
------------------------------------------------------------------------
[2002-11-26 04:38:19] jear@aabc.dk
Numeric type returns invalid result using
ibase_fetch_row/ibase_fetch_object (Windows NT).
Numbers stored as an InterBase/Firebird numeric/decimal datatype
beyond
the bounds of the PHP integer type (> 2147483647), do not return a
float
type but cause an overflow
Example:
2303511415 (decimal 10,0) returns -1991455881
PHP/Firebird example script:
$sql = "create table temp (large_number numeric(10,0))";
$result = ibase_query($sql,connection());
if (!$result) {
exit;
}
ibase_commit();
$sql = "INSERT INTO temp VALUES (2303511415)";
$result = ibase_query($sql,connection());
if (!$result) {
exit;
}
$sql = "SELECT large_number FROM temp WHERE large_number =
2303511415";
$result = ibase_query($sql,connection());
if (!$result) {
exit;
}
while ($row = ibase_fetch_row($result)) {
print($row[0]);
}
ibase_free_result($result);
$sql = "drop table temp";
$result = ibase_query($sql,connection());
if (!$result) {
exit;
}
ibase_commit();
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/20641
--
Edit this bug report at http://bugs.php.net/?id=20641&edit=1