|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-06-28 01:16 UTC] joey@php.net
[2001-07-23 12:11 UTC] pwmoosman at aol dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 06:00:01 2025 UTC |
The following script produces the following error the second time getAppName/sybase_fetch_row is called. Error (warning): /users/pmoosman/test_data/test1.php(26) : Warning - 3 is not a valid Sybase result resource Script: <?php function getConnect() { $db = sybase_connect('xxxx','yyy','zzz'); return $db; } function getAppName($app_id) { // static $db; $sql = "select name from web_apps where application_id=$app_id"; $db = getconnect(); $result = sybase_query($sql, $db); $row = sybase_fetch_row($result); // sybase_free_result($result); return $row[0]; } getAppName(23); getAppName(23); ?> Note: If I uncomment the "static $db" line, the error (warning) goes away. I ran PHP in a debugger and it looks like the sybase connection is getting destructed when the sybase_query results are getting assigned to "$result".