|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-08-31 09:04 UTC] stas@php.net
[2001-01-02 10:51 UTC] kalowsky@php.net
[2001-03-08 20:18 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 15:00:01 2025 UTC |
Changing odbc_connect to odbc_pconnect causes the script to fail, complaining that the $odbchandle "Supplied resource is not a valid ODBC-Link resource" on a odbc_close($odbchandle). Leaving the code as is works perfectly. ... // Connect to the database $odbchandle = odbc_connect( $DSN, $USERNAME, $PASSWORD ); if ( $odbchandle ) { // Query for the user record $query = "SELECT * FROM Subscribers WHERE SubscriptionID='" . $subscriberID . "'"; $queryresult = odbc_do( $odbchandle, $query ); // ... odbc_close( $odbchandle ); ... It _seems_ that commenting out the odbc_close() when using the odbc_pconnect() causes the warning to go away. Naturally this begs the question about when persistent handles go away... but still, I wouldn't think odbc_close() causes a warning. Using odbc_close_all() works just fine, with no warning.