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

Re: [Andy] Count-Global with conditions

Quote Reply
Re: [Andy] Count-Global with conditions In reply to
Hi Andy, thanx!
It works very fine!

Two little things: How i use an "OR" between two conditions?

And: How i can summarize the globals (<%counter1%>) in a template?
This two alternatives doesnt works:

<%set new = $counter1 + $counter2 + $counter3 + $counter4%>
<%neu%>

or

<%$counter1 + $counter2 + $counter3 + $counter4%>

How can i summarize counter without using a global?

I am using for counting your global called counter1:
Code:

sub {
my $cond = new GT::SQL::Condition;
$cond->add('GS_Status','=','bezahlt');
my ($total) = $DB->table('Prod_GS')->select(['COUNT(Username)'],$cond)->fetchrow_array;
return $total;
}

Thanks in advance!

Coyu
Subject Author Views Date
Thread Count-Global with conditions Coyu 2727 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