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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 07:01:27 2024 UTC