note 23078 deleted from function.rand by nlopess

From: Date: Sat, 03 Jan 2004 16:39:50 +0000
Subject: note 23078 deleted from function.rand by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62870@lists.php.net to get a copy of this message
Note Submitter: mogmios@mlug.missouri.edu ---- If you just need a quick way to generate a semi-random list of rows from a table create two random numbers x and y where 1 < x and 0 < y < 3 and then do a query like this: select id from my_table where (id % x = y) limit 20; It's much faster than using rand() and still produces reasonable random results.

« previous php.notes (#62870) next »