How do I return a random row from the database?
<?php
$query = mysql_query("SELECT name FROM millionsofnames ORDER BY rand() LIMIT 1");
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More mysql PHP Questions
How do I find the number of rows in a result set?How do I include a conditional in my mysql query?
How do I find the ID of a new row added to a table?
How do I connect to mySQL from PHP?
How do I return the date with mySQL?
