note 103169 deleted from function.rand by danbrown
| From: | danbrown@php.net | Date: | Tue, 29 Mar 2011 20:41:52 +0000 |
| Subject: | note 103169 deleted from function.rand by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-178325@lists.php.net to get a copy of this message | ||
Note Submitter: weenadelic at hotmail dot com
----
@Jesse
Why not just use
"SELECT * FROM table order by rand() LIMIT 1"
Unless the dataset contains millions of rows, it is still pretty efficient.