Hi,
If you change that too:
my $tags = shift;
my $table = $DB->table('Links');
$table->select_options ('ORDER BY Hits DESC', 'LIMIT 5');
my $sth = $table->select;
my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { top5_loop => \@output };
}You can then make your template:
<%loop top5_loop%>
<%Title%>: <%Hits%>
<%endloop%>and format it however you want.
Cheers,
Alex
--
Gossamer Threads Inc.
If you change that too:
Code:
sub { my $tags = shift;
my $table = $DB->table('Links');
$table->select_options ('ORDER BY Hits DESC', 'LIMIT 5');
my $sth = $table->select;
my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { top5_loop => \@output };
}
Code:
<%top5%> <%loop top5_loop%>
<%Title%>: <%Hits%>
<%endloop%>
Cheers,
Alex
--
Gossamer Threads Inc.