note 89906 added to function.odbc-fetch-array
| From: | JamesAuxier at osu1 dot php dot net | Date: | Fri, 27 Mar 2009 18:30:24 +0000 |
| Subject: | note 89906 added to function.odbc-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152541@lists.php.net to get a copy of this message | ||
Some interesting behavior was discovered while attempting simultaneous queries to a MS SQL server
through the ODBC/freeTDS layer on SUSE on a persistent connection with ODBC cursors enabled.
Stepping through the first resource with odbc_fetch_array() in a while loop works as expected, but
calls to subsequently created resources within that loop were failing to return data where MySQL
equivalents to the script were working just fine.
I found that adding a num_rows function call [custom function that simply steps through the result
set... the misbehavior of odbc_num_rows() is another matter] immediately following each odbc_exec()
then resetting the cursor seemed to cache the results for proper performance of the multiple active
result sets. It may be slightly slower than the MySQL equivalent, but at least it works.
----
Server IP: 208.69.120.35
Probable Submitter: 66.42.141.5
----
Manual Page -- http://www.php.net/manual/en/function.odbc-fetch-array.php
Edit -- https://master.php.net/note/edit/89906
Del: integrated -- https://master.php.net/note/delete/89906/integrated
Del: useless -- https://master.php.net/note/delete/89906/useless
Del: bad code -- https://master.php.net/note/delete/89906/bad+code
Del: spam -- https://master.php.net/note/delete/89906/spam
Del: non-english -- https://master.php.net/note/delete/89906/non-english
Del: in docs -- https://master.php.net/note/delete/89906/in+docs
Del: other reasons-- https://master.php.net/note/delete/89906
Reject -- https://master.php.net/note/reject/89906
Search -- https://master.php.net/manage/user-notes.php