MySQL timestamp stuff

Codes here !

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada

Thu Oct 03, 2002 6:10 pm

I have a login system using my db and was hoping I could make an active users list, so I need to put a field in the user db which stores when they were last on but I'm not sure how to do that with the MySQL timestamp :?:

What would be a good method for storing the time in my db?


Thu Oct 03, 2002 11:34 pm

Better to have a separate 'logging' table, on each page request insert a record with the userID and time (and whatever else), and to see how many people there are online you can count how many distinct userID's there are in the last x minutes!

Post Reply