Mark wrote:
-----Original Message-----
From: Chris [mailto:[EMAIL PROTECTED] Sent: maandag 14 augustus 2006 4:18
To: Mark
Cc: mysql@lists.mysql.com
Subject: Re: Random SELECT on subset

Then I want to select 4 random columnIDs, but only from the
subset WHERE processed = '1' (so, from the group 1,3,4,5,7).
This query should do what you want:

SELECT columnID from table where process='1' order by rand()
limit 4;

What? And all the FLOOR stuff can go? :) That sounds too simple, lol.

(just noticed a typo, my query should be where processed='1' not process='1')..

Based on what you've said that should be the whole query yes :)

Of course make sure it provides the information you want..

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to