Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Total number INT column display

Quote Reply
Total number INT column display
I have a INT type column, and would like the total number to be displayed on the front page. Are there any globals out there to add this column and display the result?

Thanks.
Quote Reply
Re: [joeybone] Total number INT column display In reply to
Hi,

Could you explain a bit more? Is this field in the Links table, or Category table?

Do you just wanna do a SUM of ALL the values held in those links. For example, if you have:

Field: 10
Field: 3
Field: 60

..then the outputted result would be 73 (i.e all them added together)

Is that what you're after?

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Total number INT column display In reply to
Hi Andy,

I found the solution from a previous post you answered:

sub {
my ($total) = $DB->table('Links')->select(['SUM(Fieldname)'])->fetchrow_array;
return $total;
}

Thanks for your help.