How do I return a random row from the database?
<?php
$query = mysql_query("SELECT name FROM millionsofnames ORDER BY rand() LIMIT 1");
?>
More mysql PHP Questions
How do I limit the number of rows returned?How do I include a conditional in my mysql query?
How do I order the results of my query?
How do I access the current time with mysql?
How do I find the ID of a new row added to a table?