Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Clicktrack Table

Quote Reply
Clicktrack Table
Hi,

I've got a quick query about the Clicktrack table in the database.. Is it ok to empty it? I've only had my site running LinksSQL for two days and the Clicktrack table already has a whopping 45,000 records -- and is using up half of my allowed storage for the MySQL database.

If it can be emptied, would I be able to do it via a daily cron job or only when I go into MySQLMan and empty the table myself.

Thanks
Amanda
Quote Reply
Re: [Evoken] Clicktrack Table In reply to
Yes...you can empty it...although that table is useful for prohibiting your web visitors from hitting a link tons of times and having those 'clicks' registered in your Links table through the build process.

Yes, you can write a shell or cgi script to remove records from that table on a daily basis by using the following SQL Statement in the script:

DELETE FROM tbl_name

Replace tbl_name with the name of the "click" table.
========================================
Buh Bye!

Cheers,
Me

Last edited by:

Stealth: Jul 5, 2002, 10:29 AM
Quote Reply
Re: [Evoken] Clicktrack Table In reply to
use DBI;

$dbh = DBI->connect ("DBI:mysql:host=localhost;database=databasename","username","password",{PrintError => 0});

$sth = $dbh->prepare('delete from lsql_Clicktrack');

$sth->execute();

print "Wahey!\n";

Last edited by:

blackikealamp: Jul 5, 2002, 3:24 PM
Quote Reply
Re: [blackikealamp] Clicktrack Table In reply to
The GT::SQL library is there to be used :)

$DB->table('ClickTrack')->delete;

Smile

Last edited by:

Paul: Jul 5, 2002, 3:25 PM
Quote Reply
Re: [Paul] Clicktrack Table In reply to
That's quite cool. I'm sure that it would be really worthwhile learning and incorporating GT's libraries into one's scripts, but I feel that it would be better to learn to use less proprietry / more open source cpan modules at the mo. But granted, good solution Smile
Quote Reply
Re: [Stealth] Clicktrack Table In reply to
Thankyou all for the replies. You've answered my question perfectly!

Now I'm off to empty my Clicktrack table. Wink

Kind regards,
Amanda
Quote Reply
Re: [Evoken] Clicktrack Table In reply to
A quick way to empty a table, is to go to the MySQLMan option in the database area, get your list of tables, and click "empty" :)

Not a cron job, but it gets the job done.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Clicktrack Table In reply to
Hello!

Happy Holidays! Smile

Can somebody, please, help me to write complete script which will remove

all data (older than 12 hours) in ClickTrack table?



Thanks in advance! Blush