Forum OpenACS Q&A: Re: Ran out of database pools (pool2 pool3 pool1)

Posted by Don Baccus on
It needs a separate database handle for each loop because once you execute the inner loop, it needs to retrieve the next row from the query result formed by the outer loop (db_foreach).  If the inner db_foreach overwrote the outer db_foreach's data people would pout and complain :)