View Full Version : users online using databases

09-02-2009, 10:34 PM
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 :)

09-02-2009, 10:54 PM
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.

09-04-2009, 06:35 AM
Thanks, seems so simple lol. Don't know why I couldn't figure that out.