Ok, Rose, I think I have it now. I tested it and it does not give any errors. Also, this should do the trick for the "limit it to once every thirty days" you asked for. Thanks goes out to Xenon for correcting my missing brackets mistake.

Here is the code I use. You can adjust it for whatever you use. I don't have the Admins names show up and the user has to have at least one post to their credit to be picked. Let me know if it does the trick for you.
PHP Code:
$newmember=$DB_site->query_first("SELECT userid,username
FROM user
WHERE userid<>$daybits[1]
AND posts>1
AND lastactivity>'.($lastposttime[dateline]-(86400*30)).'
AND (usergroupid=5
OR usergroupid=7
OR usergroupid=2)
ORDER BY RAND(NOW())
LIMIT 1");
By the way, the RAND(NOW()) just makes it more random than RAND() does. It seeds it.