note 8055 modified in rand by philip
| From: | philip@php.net | Date: | Sun, 26 Aug 2001 11:13:24 +0000 |
| Subject: | note 8055 modified in rand by philip | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17164@lists.php.net to get a copy of this message | ||
In MySQL 3.23 or greater, the following query selects a random row :
SELECT * FROM tablename ORDER BY RAND() LIMIT 1
http://www.php.net/manual/en/rand.php