Forum OpenACS Development: Re: db_transaction hanging a thread how to detect, how to kill...

Jerry, you're not a loyal reader of my blog, are you? 😊

You shouldn't have db_dml statements inside a db_foreach or vice versa. Here's how to get around it:

Of course, the problem I have with that sometimes is that db_list and db_list_of_lists do not guarantee the order of the lists. So sorting gets screwed up.

So then you have to sort it. Ug.