Gossamer Forum
Quote Reply
Top Categories by Hits
This global prints all the categories. How do I sort by Hits?


sub {
my $tags = shift;
my $cat_db = $DB->table('Category');
$cat_db->select_options("ORDER BY Full_Name");
my @root_cats = $cat_db->select ('Full_Name', { FatherID => 0 })->fetchall_list();
my $output;
foreach my $root_cat (@root_cats) {
my $url = $cat_db->as_url($root_cat);
$output .= qq~$root_cat<br>~;
}
return $output;
}

--------------------------------
Privacy Software