Page 1 of 1

Increment Values

Posted: Thu Jan 25, 2007 6:13 am
by gfirman
Hi,

I am trying to work out how to increment values in a field over a period of time. The problem is how to loop the statement which updates the values. The values need to be updated every 15 minutes. Does anyone know the easiest way to do this?

Posted: Thu Jan 25, 2007 8:47 am
by timvw
Schedule a task that gets executed every 15 minutes (using cron for example).

I would probably recommend AGAINST this practice though... In most situations it's better to keep track of the last modification data... and on retrieval of those values, apply the 'updates' based on the delta (now - last mod date)...

Posted: Thu Jan 25, 2007 10:40 am
by gfirman
ok, thanks.....I'll look into that