Page 1 of 1

Timeout in nested loops

Posted: Wed Aug 25, 2004 11:59 am
by colmtourque
I have a set of nested loops inside one of the loops I would like to make a submitable form, as such:

Code: Select all

$count=0
while (!$rsact->EOF)
{
$count=$count+1
$count2
//Data here
       while (!$rsact2->EOF)
       {
       $count2=$count2+1
       $rsact2->MoveNext(); 
        //Data
        //FORMS HERE form name changes with each count2
        }
$rsact->MoveNext(); 
}
The page tends to timeout when I enter the inner count. If I move count2 to the outer loop it does the same thing.
Setting the timeout to higher does not help any. Are there any suggestions to seting up forms dynamically like this or how to end the timeout.

thanks in advance for any help.

Posted: Wed Aug 25, 2004 12:21 pm
by dull1554
ok here is a question....does $rsact or $rsact2 ever hit the EOF limit or is it always at a point before the EOF, for the loop to resolve !$rsact->EOF has to become $rsact->EOF and !$rsact2->EOF has to become $rsact2->EOF...does this happen?

Posted: Wed Aug 25, 2004 12:30 pm
by colmtourque
The loop works so long as I do not put $count2=$count2+1 inside the second loop.

So $rsact and $rsact2 hit EOF fine.