#23629 [Opn->Csd]: Multiple row select floating point fields returning integers after first row
| From: | derick@php.net | Date: | Thu, 15 May 2003 08:22:01 +0000 |
| Subject: | #23629 [Opn->Csd]: Multiple row select floating point fields returning integers after first row | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-39696@lists.php.net to get a copy of this message | ||
ID: 23629
Updated by: derick@php.net
Reported By: chris at cheeky dot org
-Status: Open
+Status: Closed
Bug Type: Sybase-ct (ctlib) related
Operating System: Solaris 2.6
PHP Version: 4.3.1
New Comment:
Good, I thought it was. Closing then.
Previous Comments:
------------------------------------------------------------------------
[2003-05-15 03:21:01] chris at cheeky dot org
This functionality seems to be correct using PHP Version 4.3.2-RC3-dev
built from source php4-STABLE-200305141530
------------------------------------------------------------------------
[2003-05-14 10:36:58] derick@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-05-14 10:33:48] chris at cheeky dot org
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 this bug report at http://bugs.php.net/?id=23629&edit=1