Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [Chas-a] Bump hit counter > file downloads?

Quote Reply
Re: [Chas-a] Bump hit counter > file downloads? In reply to
You'll just need to add the bit which updates the hits into the section which does the downloads.

Copy

my $ip1 = $ENV{REMOTE_HOST} || $ENV{REMOTE_ADDR} || 'None';
my $click_db1 = $DB->table ('ClickTrack');
my $rows1 = $click_db1->count ( { LinkID => $id, IP => $ip1, ClickType => 'Hits' } );
if (! $rows1) {
$db->update ( { Hits => \"Hits + 1" }, { ID => $id }, { GT_SQL_SKIP_INDEX => 1 } );
$click_db1->insert ( { LinkID => $id, IP => $ip1, ClickType => 'Hits', Created => \"NOW()"} );
}

Into the previous section. I think the best place is probably just before the line

return 1;
Subject Author Views Date
Thread Bump hit counter > file downloads? Chas-a 1266 Aug 3, 2003, 10:35 AM
Thread Re: [Chas-a] Bump hit counter > file downloads?
afinlr 1224 Aug 3, 2003, 1:26 PM
Post Re: [afinlr] Bump hit counter > file downloads?
Chas-a 1218 Aug 3, 2003, 3:51 PM