[PHP] counter reseting help!

2001-04-14 Thread McShen

hi

I am writing a small counter for my site. But i am not sure how to reset the
counter every 24h. How should i do it? any suggestions would be much
appreaciated!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] counter reseting help!

2001-04-14 Thread Plutarck

How are you saving the current counter amount?

For instance if it's in a database, add a date field.

Check to see if the date is more than 24 hours old before displaying the
current counter. If it is then update the database and make the counter
number 0. If it's not older than 24 hours, just do your counter as normal.


--
Plutarck
Should be working on something...
...but forgot what it was.


""McShen"" [EMAIL PROTECTED] wrote in message
9b9mg0$26o$[EMAIL PROTECTED]">news:9b9mg0$26o$[EMAIL PROTECTED]...
 hi

 I am writing a small counter for my site. But i am not sure how to reset
the
 counter every 24h. How should i do it? any suggestions would be much
 appreaciated!



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]