View Single Post
  #3  
Old 08-14-2006, 01:43 PM
lazer lazer is offline
OSP Starters
 
Join Date: Mar 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
lazer is on a distinguished road
Default

I would set a date/time combination in my DB rather than adding a 'logged in boolean' like webviz suggested.

If the user would log on a boolean login system but would not log out properly, the user could be 'active' forever, unless the system would actively scan the userlist, which is a waste of resources.

When setting a date, you could use a simple query like;

SELECT users FROM table WHERE logindate > 01-01-2006 AND logintime > 10:00:00 sprt by users desc;

And when you have stored a date/time combination in your db you can also add a welcome message like;

Welcome user, your last login was on xx:xx, xx-xx-xxxx!

regards -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - how can i create a "users logged in now" script
View Single Post
  #3  
Old 08-14-2006, 01:43 PM
lazer lazer is offline
OSP Starters
 
Join Date: Mar 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
lazer is on a distinguished road
Default

I would set a date/time combination in my DB rather than adding a 'logged in boolean' like webviz suggested.

If the user would log on a boolean login system but would not log out properly, the user could be 'active' forever, unless the system would actively scan the userlist, which is a waste of resources.

When setting a date, you could use a simple query like;

SELECT users FROM table WHERE logindate > 01-01-2006 AND logintime > 10:00:00 sprt by users desc;

And when you have stored a date/time combination in your db you can also add a welcome message like;

Welcome user, your last login was on xx:xx, xx-xx-xxxx!

regards -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote