note 15667 added to ref.mysql
| From: | skelley at diff dot nl | Date: | Tue, 25 Sep 2001 18:11:10 +0000 |
| Subject: | note 15667 added to ref.mysql | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18298@lists.php.net to get a copy of this message | ||
Hi, here's a nice little trick to select records in random order from a table in a MySQL
database prior to version 3.23
SELECT *, (ItemID/ItemID)*RAND() AS MyRandom FROM Items ORDER BY MyRandom
--
http://www.php.net/manual/en/ref.mysql.php
http://master.php.net/manage/user-notes.php?action=edit+15667
http://master.php.net/manage/user-notes.php?action=delete+15667
http://master.php.net/manage/user-notes.php?action=reject+15667