#28484 [Opn->Bgs]: Resource type lost for ResultSet if returned in function
| From: | tjd1066 at rit dot edu | Date: | Sat, 22 May 2004 16:50:07 +0000 |
| Subject: | #28484 [Opn->Bgs]: Resource type lost for ResultSet if returned in function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-59890@lists.php.net to get a copy of this message | ||
ID: 28484
User updated by: tjd1066 at rit dot edu
Reported By: tjd1066 at rit dot edu
-Status: Open
+Status: Bogus
Bug Type: ODBC related
Operating System: Win XP/Apache 2.048
PHP Version: 4.3.6
New Comment:
Sorry was closing the connection didn't realize it.
Previous Comments:
------------------------------------------------------------------------
[2004-05-22 07:52:34] 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)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28484&edit=1