Just another Perl shrine | |
PerlMonks |
Re: Is there a good way of retrieving entries randomly from a database (MySQL perhaps)?by epoptai (Curate) |
on Jan 03, 2004 at 15:55 UTC ( [id://318517]=note: print w/replies, xml ) | Need Help?? |
You can select any number of random rows by limiting the results of your query:
It'll be much faster and more efficient than pushing all the results into an array and dumping them into a temporary table. That seems like too much work for the task you described, unless there's a good reason for the temp table.
--
In Section
Seekers of Perl Wisdom
|
|