|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
45 + 44 = ?
Subscribe to this entry?

 [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-2023 The PHP Group
All rights reserved.
Last updated: Sat Mar 25 11:03:44 2023 UTC