I don't think this will work as you expect. You will have to mark
those that you picked from those you haven't picked (and marked)
before.
> SELECT * FROM 5600k WHERE picked IS NULL ORDER BY rand() LIMIT 5000;
> But what I really want to do is:
> UPDATE 5600k SET picked=1 WHERE picked IS NULL ORDER BY rand() LIMIT 5000;
> Then doing:
> SELECT * FROM 5600k WHERE picked=1;
> Then resetting the table so I can pick a random selection again later:
> UPDATE 5600k SET picked=0 WHERE picked=1;
> So can the update statement be done to update random records?
> ---------------------------------------------------------------------
> 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
--
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