#21703 [Opn->Csd]: Float fields after first row truncate to integer

From: Date: Sat, 18 Jan 2003 02:00:30 +0000
Subject: #21703 [Opn->Csd]: Float fields after first row truncate to integer
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-30409@lists.php.net to get a copy of this message
ID: 21703 User updated by: bayuk@mindspring.com Reported By: bayuk@mindspring.com -Status: Open +Status: Closed Bug Type: Sybase-ct (ctlib) related Operating System: Linux PHP Version: 4.3.0 New Comment: Never mind (and sorry for the double post), I see this has already been fixed in CVS. Thanks! Previous Comments: ------------------------------------------------------------------------ [2003-01-17 13:28:58] bayuk@mindspring.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-16 20:21:20] bayuk@mindspring.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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21703&edit=1

« previous php.bugs (#30409) next »