I would like to add something like "Total Hits" to my site
I saw this post...from Alex - GT....which appears to be the kind of thing that I would like to do.
Is this easy & straight forward to implement?
Any advice - comments much appreciated.
Thanks - ColinT
Hi,
Add a global:
total_hits =>
--------------------------------------------------------------------------------
Code
--------------------------------------------------------------------------------
sub { my ($total) = $DB->table('Links')->select(['SUM(Hits)'])->fetchrow_array; return $total; }
--------------------------------------------------------------------------------
and then use <%total_hits%> in your template.
Cheers,
Alex
--
Gossamer Threads Inc.
Colin Thompson
I saw this post...from Alex - GT....which appears to be the kind of thing that I would like to do.
Is this easy & straight forward to implement?
Any advice - comments much appreciated.
Thanks - ColinT
Hi,
Add a global:
total_hits =>
--------------------------------------------------------------------------------
Code
--------------------------------------------------------------------------------
sub { my ($total) = $DB->table('Links')->select(['SUM(Hits)'])->fetchrow_array; return $total; }
--------------------------------------------------------------------------------
and then use <%total_hits%> in your template.
Cheers,
Alex
--
Gossamer Threads Inc.
Colin Thompson