#26891 [Fbk->Opn]: nested odbc_fetch_row produces an error
| From: | josep dot gorro at trendcomms dot es | Date: | Wed, 14 Jan 2004 06:26:00 +0000 |
| Subject: | #26891 [Fbk->Opn]: nested odbc_fetch_row produces an error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-53285@lists.php.net to get a copy of this message | ||
ID: 26891
User updated by: josep dot gorro at trendcomms dot es
Reported By: josep dot gorro at trendcomms dot es
-Status: Feedback
+Status: Open
Bug Type: ODBC related
Operating System: WindowsNT SP6a
PHP Version: Irrelevant
New Comment:
The backend database is Oracle.
Previous Comments:
------------------------------------------------------------------------
[2004-01-13 09:45:42] kalowsky@php.net
Using what database backend?
------------------------------------------------------------------------
[2004-01-13 05:49:50] josep dot gorro at trendcomms dot es
Description:
------------
I'm trying to execute a query using the same ODBC connect ID that is
customized by previous query in the same code.
If I comment second odbc_fetch_row runs fine. With this one uncommented
a Dr.Watson on server appears.
Reproduce code:
---------------
// $connect is the connect ID to the database previously
// generated without problems
$query1="SELECT F11, F12 FROM T1";
$result1=odbc_exec($connect,$query1);
while(odbc_fetch_row($result1)) {
$query2="SELECT F21, F22 FROM T2";
$result2=odbc_exec($connect,$query2);
while(odbc_fetch_row($result2)) { // HERE IS THE ERROR
do_anything;
}
}
Actual result:
--------------
In server appears a Dr.Watson error (GPF) and in Apache's error log a
line:
Premature end of script headers: c:/php/php.exe
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26891&edit=1