Hi everbody
i am using this global to display 4 random links on category page
i want to change this global that the result is to display 4 Random links
only of the category and subcategory on the category page
can someone help me?
Marina
sub { my $tags = shift;
my $link_db = $DB->table('Links');
my $limit = $tags->{Random_Limit} || 4;
my (@output, $sth);
$link_db->select_options ('ORDER BY RAND()', "LIMIT $limit");
$sth = $link_db->select ( { isNew => 'Yes', isValidated => 'Yes'});
while (my $hash = $sth->fetchrow_hashref) { push @output, $hash; }
return \@output; }

i am using this global to display 4 random links on category page
i want to change this global that the result is to display 4 Random links
only of the category and subcategory on the category page
can someone help me?

sub { my $tags = shift;
my $link_db = $DB->table('Links');
my $limit = $tags->{Random_Limit} || 4;
my (@output, $sth);
$link_db->select_options ('ORDER BY RAND()', "LIMIT $limit");
$sth = $link_db->select ( { isNew => 'Yes', isValidated => 'Yes'});
while (my $hash = $sth->fetchrow_hashref) { push @output, $hash; }
return \@output; }