#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    77
    Rep Power
    14
    Hi,

    Wondering if someone can help me. I am after something that will use a timestamp (14) from a mysql database and be able to tell how old it is based on the current time... (NOW()). I already have the field and that setup in the db but I need some code that will be able to tell how old that timestamp is. Eg. Is it more than 30 mins old. The idea behind this is to automatically log out any one who has been inactive for over 15 mins.

    So the basic idea behind this is to compare NOW() with a timestamp and be able to tell how old (say to 30 mins) the timestamp is. Thanks in advance.

    Dave
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    Dave,

    see the following discussion..
    http://www.devshed.com/Talk/Forums/F...ML/000586.html

    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."

Similar Threads

  1. Odd problem with a hash and foreach loop
    By quantumechanix in forum Perl Programming
    Replies: 7
    Last Post: December 15th, 2003, 05:06 PM
  2. Inaccurate timestamp
    By duckumu in forum PHP Development
    Replies: 1
    Last Post: September 14th, 2003, 05:30 PM
  3. Replies: 0
    Last Post: May 5th, 2003, 06:59 AM

IMN logo majestic logo threadwatch logo seochat tools logo