I have come across more than one instance when I had to select a random record from a table in a MySQL database. Here is how to do it.
The simple but slow method
SELECT * FROM mytable ORDER BY RAND() LIMIT 1;
Although simple, the above query can be very ...