Click to See Complete Forum and Search --> : How would i...
welsh
03-13-2006, 07:45 PM
Hey, what im looking to do is in a mysql database, in a column there is a number, that every 15 minutes that number goes up by 1. Now would just using php do this or would i have to do something else to achieve this? Like something on my computer that is hooked up the the database and would run that query?
NogDog
03-13-2006, 08:02 PM
Seems overly complicated to me. Why not just store the start time and starting number. Then when you need to know the current value, just subtract the start time from the current time and divide by 900 (60 seconds/minute time 15 minutes) and use floor() to trim it.
chazzy
03-13-2006, 09:00 PM
you can use linux/unix cron to schedule things to run.
and mysql 5.1 will support scheduled tasks.
welsh
03-13-2006, 09:34 PM
yea, i was thinking about that NopDog, but ill try chazzys ways, its bound to be interesting.