Returning random results with MySQL
Friday, March 21st, 2008Selecting random query results is something we often need to do, whether it be a single row or a small record set. You may want to display a random list of “tips” or “facts”, a random “user” or “related product” etc.
The simplest and most common solution you find uses the MySQL rand() function (which can [...]