Gossamer Forum
Quote Reply
Random repeatas
Hi, Im currently using this random global:

sub {
my $db = $DB->table('Links');
my $total = $db->count ( 'isValidated' => 'Yes' );
my $rand = int( rand($total) );
$db->select_options ("LIMIT $rand, 6");
my $link = $db->select->fetchrow_hashref;
my $html = Links::SiteHTML::display('link', $link);
return $html;
}

But sometimes some links get repeated.
How can I go about fixing this repeat thing?

Thanks,
Juan Carlos
Subject Author Views Date
Thread Random repeatas Gorospe 2554 Oct 12, 2006, 9:46 AM
Thread Re: [Gorospe] Random repeatas
fuzzy logic 2488 Oct 12, 2006, 12:40 PM
Post Re: [fuzzy logic] Random repeatas
Gorospe 2484 Oct 12, 2006, 1:23 PM