php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21703 Float fields after first row truncate to integer
Submitted: 2003-01-16 20:21 UTC Modified: 2003-01-17 20:00 UTC
From: bayuk at mindspring dot com Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.3.0 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bayuk at mindspring dot com
New email:
PHP Version: OS:

 

 [2003-01-16 20:21 UTC] bayuk at mindspring dot com
If the database has a float or double value, and you
select a number of rows, the first row's value is
returned correctly as a double, but subsequent rows'
values are returned truncated and converted to integer. This may be the same bug reported in "suspended"
report # 21047.

I think the problem is in 
ext/sybase_ct/php_sybase_ct.c in the function 
php_sybase_fetch_result_row(). On line 1062 you
will find a second statement on the line:
          result->numerics[j]= 1;
Which seems to set the field type back to integer after
processing the first row.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-17 13:28 UTC] bayuk at mindspring dot com
If the database has a float or double value, and you select a number of rows, the first row's value is returned correctly as a double, but subsequent rows' values are returned truncated and converted to integer. This may be the same bug reported in "suspended" report # 21047.

I think the problem is in sybase_ct/php_sybase_ct.c in the function php_sybase_fetch_result_row(). On line 1062 you will find a second statement on the line:
          result->numerics[j]= 1;
Which seems to set the field type back to integer after processing the first row.
 [2003-01-17 20:00 UTC] bayuk at mindspring dot com
Never mind (and sorry for the double post), I see this has already been fixed in CVS. Thanks!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC