> Right that's why I want to do a query which updates the picked field
> by setting it to 1 in 5000 random records where picked is null.  Then I do
> a query to pull those 5000 out.  Then I do a query to update picked to 0
> where picked = 1.  So is there a way to update a random number of records? 

I think there is a logical flaw in your reasoning. You will have
to keep those already shown as marked forever!

So: first you pick from those not marked some 5000. Then you do
whatever you want with them and mark them as picked. Then you
mark those 5000 as picked to make sure that those can't be picked
a second time. You will definitely not set those picked back to
not picked, will you?

The question is: can you pick some 5000 at random and mark them
as picked with one single query? That would be very handy.

But sorry, I don't know. Maybe some experts do.


-- 
Herzlich
Werner Stuerenburg            

_________________________________________________
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to