#23629 [NEW]: Multiple row select floating point fields returning integers after first row

From: Date: Wed, 14 May 2003 15:33:48 +0000
Subject: #23629 [NEW]: Multiple row select floating point fields returning integers after first row
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39631@lists.php.net to get a copy of this message
From: chris at cheeky dot org Operating system: Solaris 2.6 PHP version: 4.3.1 PHP Bug Type: Sybase-ct (ctlib) related Bug description: Multiple row select floating point fields returning integers after first row When returning multiple rows from a table and some of the fields contain floating point figures (ie Datatypes of Money, Smallmoney or Float). The first row is returned fine. Any row after the first, the floating point numbers are sent back as integers. I have tried sybase_fetch_row, sybase_fetch_array and sybase_fetch_assoc. All of these produce the same affect. If I run two lines of SQL to return the two rows seperately, each row will be fine. It only happens when you select a number of rows at a time. I have tried this with the above datatypes. Info in our setup is shown below: Adaptive Server Enterprise/12.0.0.4/P/SWR 10044 ESD 2/Sun_svr4/OS 5.6/1789/32bit/FBO/Mon Feb 4 23:47:53 2002 Apache 1.3.27 with PHP running as a DSO PHP configureation: './configure' '--without-mysql' '--with-apxs=/usr/local/phpapache/bin/apxs' '--enable-track-vars' '--with-jpeg-dir=/export/home/www/packages/jpeg' '--enable-safe-mode' '--with-sybase-ct=/usr/local/sybase/12.0/OCS-12_0' '--with-zlib' '--with-gd' '--with-png-dir=/export/home/www/packages/png' '--with-ttf=/export/home/www/packages/freetype' Here is a print_r of the $row which selected two rows where both vat and discount should be the same values in both rows: (I have checked the table in sybase and they are both the same values!) Array ( [transactionid] => 307 [userid] => 28 [creationdate] => May 14 2003 4:11PM [status] => 0 [subtotal] => 150 [discount] => 0 [vat] => 26.25 [total] => 176.25 [deleted] => 0 ) Array ( [transactionid] => 308 [userid] => 28 [creationdate] => May 14 2003 4:11PM [status] => 0 [subtotal] => 150 [discount] => 0 [vat] => 26 [total] => 176 [deleted] => 0 ) Cheers....... -- Edit bug report at http://bugs.php.net/?id=23629&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23629&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23629&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23629&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23629&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23629&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23629&r=support Expected behavior: http://bugs.php.net/fix.php?id=23629&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23629&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23629&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23629&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23629&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23629&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23629&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23629&r=gnused

« previous php.bugs (#39631) next »