good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Re: Re: Is there a good way of retrieving entries randomly from a database (MySQL perhaps)?by sgifford (Prior) |
on Jan 04, 2004 at 09:53 UTC ( [id://318645]=note: print w/replies, xml ) | Need Help?? |
MySQL may repeat results if you do repeated queries with ORDER BY rand LIMIT 1. But it won't if you ask for all 10 questions at once---ORDER BY rand LIMIT 10. You may have to issue one query per subject, but so what? Unless there are dozens of subjects, the speed difference won't be noticeable.
In Section
Seekers of Perl Wisdom
|
|