Don't ask for much do you .
Try this (note that you'll need to change the red prefix for your setup):
sub {
my $table = $DB->table('Reviews','Links');
$table->select_options ("GROUP BY Review_LinkID", "ORDER BY total DESC", "LIMIT 10");
my $sth = $table->select(['SUM(Review_Rating) AS total','lsql_Links.*']);
my $output;
while (my $rec=$sth->fetchrow_hashref){
$output .= "<li>$rec->{'Title'} ($rec->{'total'})";
}
return $output;
}
Try this (note that you'll need to change the red prefix for your setup):
sub {
my $table = $DB->table('Reviews','Links');
$table->select_options ("GROUP BY Review_LinkID", "ORDER BY total DESC", "LIMIT 10");
my $sth = $table->select(['SUM(Review_Rating) AS total','lsql_Links.*']);
my $output;
while (my $rec=$sth->fetchrow_hashref){
$output .= "<li>$rec->{'Title'} ($rec->{'total'})";
}
return $output;
}