Hi,
I've updatet from 2 to 3.1 and it's all working but one global not. Here's the code:
sub {
# Displays last 10 search terms.
my $tags = shift;
my $table = $DB->table('SearchLogs');
$table->select_options ('ORDER BY HitCount DESC', 'LIMIT 10');
my $len = 22;
my $cond = GT::SQL::Condition->new('char_length(Term)', '<', $len);
$cond->add('Results','>',0);
my $sth = $table->select($cond);
my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { top10_search_loop => \@output };
}
I've checked the field names seem to be correct.
Kai
___________________________________________
http://www.westalgarve.de
http://www.portugalforum.org
http://www.portugal-links.de
I've updatet from 2 to 3.1 and it's all working but one global not. Here's the code:
Code:
top10_search: sub {
# Displays last 10 search terms.
my $tags = shift;
my $table = $DB->table('SearchLogs');
$table->select_options ('ORDER BY HitCount DESC', 'LIMIT 10');
my $len = 22;
my $cond = GT::SQL::Condition->new('char_length(Term)', '<', $len);
$cond->add('Results','>',0);
my $sth = $table->select($cond);
my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { top10_search_loop => \@output };
}
I've checked the field names seem to be correct.
Kai
___________________________________________
http://www.westalgarve.de
http://www.portugalforum.org
http://www.portugal-links.de