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

Count-Global with conditions

Quote Reply
Count-Global with conditions
Hi,
how can i add into this global conditions?

Code:

sub {
my ($total) = $DB->table('Users')->select(['COUNT(Logins)'])->fetchrow_array;
return $total;
}

for example i need only to count this, when Status eq 'Administrator' and Logins >= 3.
How can i easily add conditions into the upper global?

And: How can i make the table open? So that i can start the global including the variabel like this:
<%counter('Users')%>

Thanks in advance!

Coyu
Subject Author Views Date
Thread Count-Global with conditions Coyu 2728 Aug 31, 2004, 9:22 AM
Thread Re: [Coyu] Count-Global with conditions
Andy 2627 Aug 31, 2004, 10:14 AM
Thread Re: [Andy] Count-Global with conditions
Coyu 2616 Sep 1, 2004, 4:24 AM
Thread Re: [Coyu] Count-Global with conditions
Andy 2616 Sep 1, 2004, 4:33 AM
Post Re: [Andy] Count-Global with conditions
Coyu 2592 Sep 1, 2004, 5:40 AM