Hi there,
have a problem with selecting unrepeated random row from the database (mysql+php) of 40.000 users where 10.000 are subscribed to our service, visitor can browse through hundreds of names at once and can be a lot of simultaneous users
here is the code i'm using at the moment:
$not_in_ids - hidden form variable where i add ID's
SELECT name, id FROM users WHERE subscribed = 1 AND id NOT IN ($not_in_ids) ORDER BY rand() limit 1