Re: Making MYSQL's RAND() more random

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

 



On 10/3/05, Graham Anderson <grahama@xxxxxxxx> wrote:> what would be the best way to make MYSQL's RAND() more random ?
http://dev.mysql.com/doc/mysql/en/mathematical-functions.html:
<snip>RAND() is not meant to be a perfect random generator, but instead afast way to generate ad hoc random numbers that is portable betweenplatforms for the same MySQL version.</snip>
You might try pulling the results into a PHP array and then use PHP'srandom functions instead.  I always got good randomness withmt_rand().

--Greg DonaldZend Certified EngineerMySQL Core Certificationhttp://destiney.com/

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux