Topic: Update a MySQL 5.0 InnoDB table column on a daily basis (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=30952" title="Pages that link to Topic: Update a MySQL 5.0 InnoDB table column on a daily basis (Page 1 of 1)" rel="nofollow" >Topic: Update a MySQL 5.0 InnoDB table column on a daily basis <span class="small">(Page 1 of 1)</span>\

 
DavidJCobb
Nervous Wreck (II) Inmate

From: United States
Insane since: Mar 2009

posted posted 04-10-2009 04:41

Basically, I have a hit counter that I keep track of using an InnoDB table on a MySQL 5.0 database. The table has six fields (and a seventh field that's not relevant to this discussion): "all", "all_unique", "day", "day_unique", "month", and "month_unique". The "day" and "month" keys show the hits for the current day/month, and therefore need to be automatically cleared on a daily and monthly basis, respectively.

So my question is, how, on a MySQL 5.0 (as in, "not 5.3 and therefore not supporting events") database, do I run an UPDATE query on a daily basis? If it's not possible with just MySQL, is it possible to schedule a PHP script to run on a daily basis?

----------------------

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 04-10-2009 08:56

read up on cron jobs.

DavidJCobb
Nervous Wreck (II) Inmate

From: United States
Insane since: Mar 2009

posted posted 04-11-2009 01:57

Thanks for the help

----------------------



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu