|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23171 sybase_fetch_* functions round off floats
Submitted: 2003-04-11 10:58 UTC Modified: 2003-04-12 09:23 UTC
From: thni at kundkraft dot se Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.3.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: thni at kundkraft dot se
New email:
PHP Version: OS:


 [2003-04-11 10:58 UTC] 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). 

Test table layout and data:
create table test (id  float)
insert into test values(1.23)
insert into test values(4.56)
$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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-12 09:23 UTC]
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
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 07:01:35 2024 UTC