Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2003
    Location
    USA
    Posts
    99
    Thanks
    24
    Thanked 0 Times in 0 Posts

    users online using databases

    I want to write this out, and I'm sure I can but I struggle with timestamps.

    I can write insert unique users with ip, timestamp, etc to a db, but how can I remove them after a set amount of time. I know I would need timestamps, but I can't figure out what exactly to do.

    Any help appreciated

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    After you are done adding a new row, run a delete SQL query that removes any rows with a timestamp older than whatever time period you desire.
    OracleGuy

  • Users who have thanked oracleguy for this post:

    Blatch (09-04-2009)

  • #3
    New Coder
    Join Date
    Mar 2003
    Location
    USA
    Posts
    99
    Thanks
    24
    Thanked 0 Times in 0 Posts
    Thanks, seems so simple lol. Don't know why I couldn't figure that out.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •