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

Products: Gossamer Links: Development, Plugins and Globals: Re: [Alex] top 5 search terms global: Edit Log

Here is the list of edits for this post
Re: [Alex] top 5 search terms global
Thanks Alex

but the links on that page are not active any more so I could not get the codes.

I am not a programer..
I tried the following code :

sub {
# -----------------------------------------------
# Returns a list of the Top5 Searched terms.
$search_db = $DB->table('SearchLog');
$search_db->select_options ('ORDER BY Results DESC', 'LIMIT 5');
$sth = $search_db->select;
while (my $row = $sth->fetchrow_hashref) {
my $output = ''; ## See Post below
my $term_q;
if ($Search->hits) {
foreach my $term (@{$results}) {
$term = $Search->array_to_hash($term);
$term_q = $in->escape($term->{Term});
$output .= qq~ <a href="$LINKS{db_cgi_url}/search.cgi?query=$term_q">${$term}{Term}</a> -
~;
}
}
else {
$output = "Sorry no one has Searched for anything yet.";
}
return $output;
}

and it is not working

can someone take a look and tell me what is wrong in it (if any is rightWink).


Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory

Last edited by:

pugdog: Dec 29, 2001, 5:09 PM

Edit Log: