Gossamer Forum
Quote Reply
top review writer
Hi could not find it in the forum,
so I changed the user links top 10 global
to a user reviews top 10 global by myself.

Still wondering that the global is working Wink

The global shows the top 5 review writer


Code:
sub {

my $db = $DB->table('Reviews');
$db->select_options( "GROUP BY Review_Owner","ORDER BY review_count DESC","LIMIT 10");
my $sth = $db->select("Review_Owner", "COUNT(*) as review_count") or die "Query Error: $GT::SQL::error";

my $back;
while (my ($s, $c) = $sth->fetchrow_array) {
my $url = $CFG->{db_cgi_url} . "/review.cgi?username=$s";
$back .= qq| <a href="$url">$s</a> ($c Kommentare) <br />|;
}

return $back;

}

Matthias

Matthias
gpaed.de
Quote Reply
Re: [Matthias70] top review writer In reply to
Hi,

That should work ok.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!