Log in

View Full Version : Inactive Staff?



Moh
05-03-2008, 08:07 PM
Well to make our managements job easier, we are adding a active & inactive staff view.
So when they login in, it updates the database so we know when they last logged in.

But how would we make it work out whos active and whos not?

So if the login date was 05022008 (5th Febuary 2008) and because they havent logged in over 1 month (but the inactive is 1 week) how would we do the query?

LegendOfNoob
05-03-2008, 08:14 PM
well lets see
1.get current date
2.get last login date
3. compare dates like if month 1 higher than record mark inactive

Moh
05-03-2008, 08:22 PM
well lets see
1.get current date
2.get last login date
3. compare dates like if month 1 higher than record mark inactive
Easier said than done :(

redtom
05-03-2008, 08:30 PM
Just log the dates they logon in a database then grab the database info and the current date, then current date - the last logged on date, if that is equal to or greater then what ever a month is then update there profile with an inactive mark, else leave it alone or update to active.

MrCraig
05-03-2008, 08:32 PM
id use a timestamp tbh rather than date.

Agnostic Bear
05-03-2008, 08:44 PM
id use a timestamp tbh rather than date.

Yah, use the Unix timestamp.

Moh
05-03-2008, 08:47 PM
id use a timestamp tbh rather than date.


Yah, use the Unix timestamp.
What exactly is timestamp?

Want to hide these adverts? Register an account for free!