#23171 [NEW]: sybase_fetch_* functions round off floats
| From: | thni at kundkraft dot se | Date: | Fri, 11 Apr 2003 15:58:10 +0000 |
| Subject: | #23171 [NEW]: sybase_fetch_* functions round off floats | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-37574@lists.php.net to get a copy of this message | ||
From: thni at kundkraft dot se
Operating system: Linux
PHP version: 4.3.1
PHP Bug Type: Sybase-ct (ctlib) related
Bug description: sybase_fetch_* functions round off floats
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 bug report at http://bugs.php.net/?id=23171&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23171&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23171&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23171&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23171&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23171&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23171&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23171&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23171&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23171&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23171&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23171&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23171&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23171&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23171&r=gnused