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

Re: [Coyu] Count-Global with conditions

Quote Reply
Re: [Coyu] Count-Global with conditions In reply to
Quote:
Two little things: How i use an "OR" between two conditions?

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


Quote:
How can i summarize counter without using a global?

Not sure. The way I would do it, is;

<%global_name($count1,$counter2,$counter3,$count4)%>

Code:
sub { return $_[0] + $_[1] + $_[2] + $_[3] }

Hope that helps.

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!
Subject Author Views Date
Thread Count-Global with conditions Coyu 1957 Aug 31, 2004, 9:22 AM
Thread Re: [Coyu] Count-Global with conditions
Andy 1907 Aug 31, 2004, 10:14 AM
Thread Re: [Andy] Count-Global with conditions
Coyu 1897 Sep 1, 2004, 4:24 AM
Thread Re: [Coyu] Count-Global with conditions
Andy 1896 Sep 1, 2004, 4:33 AM
Post Re: [Andy] Count-Global with conditions
Coyu 1891 Sep 1, 2004, 5:40 AM