php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22271 sybase_fetch_array / sybase_fetch_object returns wrong datatype
Submitted: 2003-02-18 08:29 UTC Modified: 2003-02-19 03:40 UTC
From: aheckmann at m-s dot de Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.3.0 OS: SuseLinux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: aheckmann at m-s dot de
New email:
PHP Version: OS:

 

 [2003-02-18 08:29 UTC] 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?



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-19 03:40 UTC] aheckmann at m-s dot de
The Problem is fixed in cvs-snapshot

Thanks
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun May 16 09:01:23 2021 UTC