Page 1 of 1

If the time now is a new hour then...

Posted: Wed Nov 07, 2007 9:38 am
by eon201
Hi,

Im trying to think of a way to write a piece of code that basiaclly does this.

If the time now is a new hour then...
If the time now is a new day then...
if the time is a new week then...
if the time now is a new month then...

once I have that I can create mysql tables at the right time to store data.

Thanks in advance!

Posted: Wed Nov 07, 2007 10:47 am
by CoderGoblin
Store old times for comparison, then use strftime to get appropriate now values.

Re: If the time now is a new hour then...

Posted: Wed Nov 07, 2007 1:48 pm
by Kieran Huggins
eon201 wrote:once I have that I can create mysql tables at the right time to store data.
er... this smells of bad design to me.

Why all the extra tables?