Gossamer Forum
Quote Reply
Review by ID
How do I modify the following global so the random review it's calling is taken from just 1 particular ID number?
Code:
sub {
my $tags = shift;
my $review_db = $DB->table('Reviews');
my $limit = $tags->{Random_Limit} || 1;
my (@output, $sth);
$link_db->select_options ('ORDER BY RAND()', "LIMIT $limit");
$sth = $review_db->select();
while (my $hash = $sth->fetchrow_hashref) {
push @output, $hash;
}
return { random_reviews => \@output }
}

--------------------------------
Privacy Software
Subject Author Views Date
Thread Review by ID BLOOD 1877 Jun 5, 2004, 3:46 AM
Thread Re: [BLOOD] Review by ID
BLOOD 1817 Jun 5, 2004, 11:33 AM
Post Re: [BLOOD] Review by ID
Andy 1815 Jun 6, 2004, 4:47 AM