note 103176 deleted from function.rand by danbrown
| From: | danbrown@php.net | Date: | Wed, 30 Mar 2011 14:04:28 +0000 |
| Subject: | note 103176 deleted from function.rand by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-178344@lists.php.net to get a copy of this message | ||
Note Submitter: populus117 at hotmail dot com
----
@Jesse
You can actually get a random row from MySQL in a much simpler way:
$sql = "SELECT * FROM
table_name ORDER BY RAND() LIMIT 1";