In my database I have a hundred or so items layed out like this,
id name shown
1 Pez yes
2 Giles no
3 Bob yes
etc...
I am trying to randomly select one of the entries where shown is yes.
What is an easy way to do this? I have to be able to expand the database and it still work.
So someone clicks give me a name and the php randomly choses a name from the database but only out of ones that shown is == to yes.
However users will be able to add their name to the database, then a admin will alow the name to be shown (to prevent abuse) . And the new name will be added to the list of randomly choosable names.
Thanks,