MySQL timestamp stuff

Codes here !

Moderators: macek, egami, gesf

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

MySQL timestamp stuff

Postby Xerpher » 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?

Jay

Postby Jay » 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!


Return to “mySQL & php coding”

Who is online

Users browsing this forum: No registered users and 1 guest