Re: Rand() Emulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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...



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux