Re: Rand() Emulation

From: Date: Tue, 24 Jun 2003 17:54:22 +0000
Subject: Re: Rand() Emulation
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-28873@lists.php.net to get a copy of this message
Yes its more than possible to do as you suggested, but as you implied, not very friendly, when it comes to large result sets... Roedel, Mark wrote:
Might it be simpler, since you're assuming the presence of PHP anyway, to just read your entire result set into an array and then shuffle() it and then pick off the top however-many entries? Of course, that won't be very memory-efficient for particularly large data sets...


« previous php.db (#28873) next »