Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

MySQL timestamp stuff

Codes here !

Moderators: macek, egami, gesf

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?
Xerpher
New php-forum User
New php-forum User
 
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada

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


Return to mySQL & php coding

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron