note 114190 added to features.persistent-connections
| From: | phpatalfadogdotnet | Date: | Wed, 22 Jan 2014 16:07:39 +0000 |
| Subject: | note 114190 added to features.persistent-connections | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-198303@lists.php.net to get a copy of this message | ||
One additional not regarding odbc_pconnect and possibly other variations of pconnect:
If the connection encounters an error (bad SQL, incorrect request, etc), that error will return with
be present in odbc_errormsg for every subsequent action on that connection, even if subsequent
actions don't cause another error.
For example:
A script connects with odbc_pconnect.
The connection is created on it's first use.
The script calls a query "Select * FROM Table1".
Table1 doesn't exist and odbc_errormsg contains that error.
Later(days, perhaps), a different script is called using the same parameters to odbc_pconnect.
The connection already exists, to it is reused.
The script calls a query "Select * FROM Table0".
The query runs fine, but odbc_errormsg still returns the error about Table1 not existing.
I'm not seeing a way to clear that error using odbc_ functions, so keep your eyes open for this
gotcha or use odbc_connect instead.
----
Server IP: 192.41.45.150
Probable Submitter: 65.121.95.20
----
Manual Page -- http://php.net/manual/en/features.persistent-connections.php
Edit -- https://master.php.net/note/edit/114190
Del: integrated -- https://master.php.net/note/delete/114190/integrated
Del: useless -- https://master.php.net/note/delete/114190/useless
Del: bad code -- https://master.php.net/note/delete/114190/bad+code
Del: spam -- https://master.php.net/note/delete/114190/spam
Del: non-english -- https://master.php.net/note/delete/114190/non-english
Del: in docs -- https://master.php.net/note/delete/114190/in+docs
Del: other reasons-- https://master.php.net/note/delete/114190
Reject -- https://master.php.net/note/reject/114190
Search -- https://master.php.net/manage/user-notes.php