On Mon, 20 May 2002 21:02:53 -0700 Zachary Buckholz <[EMAIL PROTECTED]> wrote:

> I have two subs in my program one, selects a list of urls to work on and
> then the next sub updates the selected url's because I am running fork and
> don't want another process to check out the same url's thus causing things
> to go crazy.
> 
> But my problem is that while this was good intentioned, it's not quick
> enough. By the time one sub has checked out the url's and the next sub has
> updated them to try and prevent them from being checked out again another
> child process has already run the first select query and gotten the same
> list of URLs.
> 
> So how can I add the update to the initial select?

In some RDBMS you can SELECT ... FOR UPDATE, but since you didn't mention
what one you are using, I can't say if yours allows that.

-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.


Reply via email to