Gossamer Forum
Quote Reply
mysql rand seed
Is the seed built in?

Would this work better than RAND for randomizing (saw this on a board):

$seed= rand();
$result = mysql_query("SELECT banner_pic,site_addr FROM banner_rotation WHERE width='468' AND height='60' ORDER BY RAND($seed) LIMIT 1");

But I guess the function rand() would have to be in the PERL library. Not sure if this makes a difference.
Subject Author Views Date
Thread mysql rand seed scorpioncapital 2339 Nov 27, 2004, 8:12 AM
Post Re: [scorpioncapital] mysql rand seed
scorpioncapital 2260 Nov 27, 2004, 8:13 AM
Post Re: [scorpioncapital] mysql rand seed
scorpioncapital 2253 Nov 29, 2004, 10:16 AM