For every user?
You could try;
<%global_name%>
my $total;
my $sth = $DB->table('User')->select( ['FieldName'] );
while (my ($value) = $sth->fetchrow) {
$total += $value;
}
return $total;
}
This is untested, and will require a little tweaking to match up with your field names ... but it should work :)
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!
You could try;
<%global_name%>
Code:
sub { my $total;
my $sth = $DB->table('User')->select( ['FieldName'] );
while (my ($value) = $sth->fetchrow) {
$total += $value;
}
return $total;
}
This is untested, and will require a little tweaking to match up with your field names ... but it should work :)
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!