php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28484 Resource type lost for ResultSet if returned in function
Submitted: 2004-05-22 07:52 UTC Modified: 2004-05-22 18:50 UTC
From: tjd1066 at rit dot edu Assigned:
Status: Not a bug Package: ODBC related
PHP Version: 4.3.6 OS: Win XP/Apache 2.048
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: tjd1066 at rit dot edu
New email:
PHP Version: OS:

 

 [2004-05-22 07:52 UTC] tjd1066 at rit dot edu
Description:
------------
Mysql over ODBC connection is the DB in use.
PHP win32 zip binary dist no compile options set by me.

If odbc_exec() is performed in a function it performs well and returns a result resource. However if that result resource is that returned by the function the type value that was ODBC Result changes to unknown.  

extension=php_java.dll
extension=php_pgsql.dll
session.save_path = "C:\php\tmp"

Reproduce code:
---------------
function doQuery ($p_Query = ""){
	
global $g_DatabaseName, $g_DBUserName, $g_DBPassword;
$v_DBHandle = odbc_connect($g_DatabaseName,$g_DBUserName,$g_DBPassword);
	
$v_QueryResult = odbc_exec( $v_DBHandle, $p_Query);
var_dump($v_QueryResult);
		disposeDBHandle($v_DBHandle);
		return $v_QueryResult;
}

$result=doQuery("SELECT * FROM SHIPPERS;");
var_dump($result);

Expected result:
----------------
resource(34) of type (odbc result) 

Actual result:
--------------
resource(34) of type (Unknown) 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-22 18:50 UTC] tjd1066 at rit dot edu
Sorry was closing the connection didn't realize it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 02:01:29 2024 UTC