#23171 [Opn->Csd]: sybase_fetch_* functions round off floats
| From: | thekid@php.net | Date: | Sat, 12 Apr 2003 14:23:19 +0000 |
| Subject: | #23171 [Opn->Csd]: sybase_fetch_* functions round off floats | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-37599@lists.php.net to get a copy of this message | ||
ID: 23171
Updated by: thekid@php.net
Reported By: thni at kundkraft dot se
-Status: Open
+Status: Closed
Bug Type: Sybase-ct (ctlib) related
Operating System: Linux
PHP Version: 4.3.1
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, 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/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2003-04-11 10:58:10] thni at kundkraft dot se
The sybase_fetch_array and sybase_fetch_object functions seem to cast
float values to integers from the second resultset and onwards.
The following script doesn't echo two floats, but a float and an
integer(1.23 and 4).
<?php
/*
Test table layout and data:
create table test (id float)
go
insert into test values(1.23)
insert into test values(4.56)
go
*/
$conn = sybase_pconnect("foo", "bar", "baz");
$q = sybase_query("SELECT id FROM test");
while($res = sybase_fetch_array($q)) {
echo "$res[0]<br>";
}
?>
My configure line is:
./configure --with-sybase-ct=/opt/sybase --enable-ftp
--with-apache=../apache_1.3.27 --with-gd --enable-trans-sid
--disable-debug --enable-bcmath --with-zlib --without-mysql
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23171&edit=1