Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Clear SearchLogs Table

Quote Reply
Clear SearchLogs Table
GLinks 3.0.1

Question:

I would like to clear the SearchLogs table every 24 hrs. by cron.

Would any one know the command line to do this, or is there a way to do it during a build?


Thanks in Advance for your help!
Quote Reply
Re: [rascal] Clear SearchLogs Table In reply to
Hi,

A quick fix, would be to edit nph-build.cgi. Find;

Code:
main();

..and add;

$DB->table('SearchLog')->delete_all();

I was trying to write a quick plugin to do this for you, but can't find a list of hooks Shocked

Hope that helps.

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!
Quote Reply
Re: [Andy] Clear SearchLogs Table In reply to
Thank you Andy,

Worked fine, but I would like to see this set as an individual cron command.
Quote Reply
Re: [rascal] Clear SearchLogs Table In reply to
Try:
Code:
/path/to/admin/admin.cgi 'days=0&do=page&page=tools_search_logs.html'

Adrian