Hi,
I'm using this global to show the last search terms, ordered by HitCount:
# Displays last 10 search terms.
my $tags = shift;
my $table = $DB->table('SearchLog');
$table->select_options ('ORDER BY HitCount DESC', 'LIMIT 5');
my $sth = $table->select;
my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { top10_search_loop => \@output };
}
I like to make two changes:
1. I don't like to show searches without results.
2. I like to exclude from the list search terms with more than than x chars ...
any ideas how to change the code?
Kai
___________________________________________
http://www.westalgarve.de
http://www.portugalforum.org
http://www.portugal-links.de
I'm using this global to show the last search terms, ordered by HitCount:
Code:
sub { # Displays last 10 search terms.
my $tags = shift;
my $table = $DB->table('SearchLog');
$table->select_options ('ORDER BY HitCount DESC', 'LIMIT 5');
my $sth = $table->select;
my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { top10_search_loop => \@output };
}
I like to make two changes:
1. I don't like to show searches without results.
2. I like to exclude from the list search terms with more than than x chars ...
any ideas how to change the code?
Kai
___________________________________________
http://www.westalgarve.de
http://www.portugalforum.org
http://www.portugal-links.de