note 28832 deleted from function.rand by aidan

From: Date: Sat, 10 Jul 2004 02:34:48 +0000
Subject: note 28832 deleted from function.rand by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-72967@lists.php.net to get a copy of this message
Note Submitter: Hitek@lvcm.com ---- Just a note on using mysql RAND(). I tested this on a win2k server running mysql 3.23.52, and, using a table with 20 rows, querying 20 times using the "order by RAND() limit 1" directive returned only (one of) the last 3 rows. Theoretically, this should have given me one occurence of each row (or some close approximation thereof) I don't know if this is a bug in mysql in general, or only the NT build, but until I learn otherwise, I'll stick to using php RAND().

« previous php.notes (#72967) next »