Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [Andy] Global for Search Words: Edit Log

Here is the list of edits for this post
Re: [Andy] Global for Search Words
Andy wrote:
Code:
Top search words:

sub {
my ($output,$db,$sth);
my $db = $DB->table('SearchLogs');
$db->select_options ('ORDER BY slog_count DESC', 'LIMIT 5');
$sth = $db->select;

while (my $row = $sth->fetchrow_hashref) {
$output .= qq~*&nbsp;<a href="$CFG->{db_cgi_url}/search.cgi?query=$row->{slog_query}">$row->{slog_query}</a>
~;
}
$output ? return $output : return 'No terms yet!';

}

I' ve changed this code to:

Code:
sub {
my ($output,$db,$sth);
my $db = $DB->table('SearchLog');
$db->select_options ('ORDER BY HitCount DESC', 'LIMIT 10');
$sth = $db->select;

while (my $row = $sth->fetchrow_hashref) {
$output .= qq~*&nbsp;<a href="$CFG->{db_cgi_url}/search.cgi?query=$row->{Term}">$row->{Term}</a><br>~;
}
$output ? return $output : return 'No terms yet!';

}

Last edited by:

katakombe: Aug 22, 2007, 8:52 AM

Edit Log: