#22271 [Opn->Fbk]: sybase_fetch_array / sybase_fetch_object returns wrong datatype
| From: | iliaa@php.net | Date: | Wed, 19 Feb 2003 00:05:55 +0000 |
| Subject: | #22271 [Opn->Fbk]: sybase_fetch_array / sybase_fetch_object returns wrong datatype | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-33482@lists.php.net to get a copy of this message | ||
ID: 22271
Updated by: iliaa@php.net
Reported By: aheckmann at m-s dot de
-Status: Open
+Status: Feedback
Bug Type: Sybase-ct (ctlib) related
Operating System: SuseLinux
PHP Version: 4.3.0
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2003-02-18 08:29:43] aheckmann at m-s dot de
if you have in your database in field double 1.1, 2.2, 3.3, 4.4
while($robj=sybase_fetch_object($rs))
{
echo $robj->double ."\n";
}
output is:
1.1
2
3
4
Only the first value is correct ...
The error seems to be in ext/sybase_ct/php_sybase_ct.c in line 1062:
switch (result->numerics[j]) {
case 1:
convert_to_long(&result->data[i][j]);
break;
case 2:
convert_to_double(&result->data[i][j]); result->numerics[j]= 1;
break;
}
why "result->numerics[j]= 1"; //Debugging stuff?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22271&edit=1