Forum Moderators: coopster

Message Too Old, No Replies

Database Datetime

         

dkin

3:56 pm on May 1, 2005 (gmt 0)

10+ Year Member



I would like to use database datetime to track how often a user is allowed to click on a link from my site, if I am going to use it I need to approach this very cautiously, I do not want the users to be able to cheat and I do not want to overload my server with to much activity.

So if someone could give me a quick once over of how to use the datetime/datestamp it would help greatly. I need to know how to set it then how to call it and display it in hours : minutes : seconds format.

Thank you all.

dkin

6:09 pm on May 1, 2005 (gmt 0)

10+ Year Member



anyone?

ketel

6:28 pm on May 1, 2005 (gmt 0)

10+ Year Member



If you use mysql you can simply use now() in the query, this is a mysql command that gives the current time.

To display it's something like

$datetime = date(d M Y h:m:s",strtotime($timefromdb));