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

Products: Gossamer Links: Development, Plugins and Globals: Re: [qix] Counting different Links: Edit Log

Here is the list of edits for this post
Re: [qix] Counting different Links

Here you go:

Make a new global - called "count_links_with_type"

sub {
my $field = 'Type';
return $DB->table('Links')->count( { $field => $_[0] } ) || 0;

Be sure to edit the bit in red to the field name that holds the download type =)

Then, call with:

Freeware: <%count_links_with_type('Freeware')%>
Shareware: <%count_links_with_type('Shareware')%>

Hope that helps.


Andy (mod)
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!

Last edited by:

Andy: Apr 8, 2008, 4:39 AM

Edit Log: