SQL housekeeping tasks on Herkoku
Posted
by Chris Beeson
on Stack Overflow
See other posts from Stack Overflow
or by Chris Beeson
Published on 2010-05-03T09:18:12Z
Indexed on
2010/05/03
9:28 UTC
Read the original article
Hit count: 386
Hi,
I'm not sure how to do this...
I have a database which contains a messages and categories tables.
The categories table has a field which has a count of the number of messages related to it.
Sometimes however I need to deactivate (active = 0) a message, at the moment this doesn't then update the category table... I will implement this is in the end but for the time I would just like to run a script perhaps daily that goes through all the categories, counts up the messages and updates the field.
What the best way of doing this?
Thanks in advance
Chris
© Stack Overflow or respective owner