How do I modify the following global so the random review it's calling is taken from just 1 particular ID number?
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
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