Forum Moderators: coopster

Message Too Old, No Replies

last post date

         

rokec

8:48 am on Oct 1, 2006 (gmt 0)

10+ Year Member



I want a code which will write last post date into database (updating last post, calculating how many days ago was this last post). I know it is a simple code, but i have problems with it.

henry0

12:25 pm on Oct 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Post you trial code, then we might be able to provide some help.

rokec

1:32 pm on Oct 1, 2006 (gmt 0)

10+ Year Member



I don't have a code so i write "I need a code"... May i explain a problem more closely:

When someone will click the buttton the column date will update to time(). After 5 days 15 hours 19 minutes and 56 sec i want to calculate how many days passed. In this case result should be 5.

coopster

11:59 am on Oct 2, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You store the last post timestamp in your file. Now, whenever you want to query the last post information you compare that column of your table with the CURRENT_TIMESTAMP to calculate the time lapse.