[thechat] info about mysql/authentication features

Sølve Horrigmoe solve at presens.nl.no
Sat Aug 18 06:24:39 CDT 2001


Matt M Rasp wrote:
> 
> i have an idea for making the days auto increment but i'm not sure how to
> exactly put that into action.
> I'm thinking of using the UPDATE dayssincelogin     row and +1 to it so
> it adds 1 to all the numbers.
> But i dunno how to trigger it every 24 hours
> and for when they login i think i have an idea to UPDATE dayssincelogin


I have a field called lastlogin in my Users table which is a *nix
timestamp and is updated with the current timestamp at each login. Then
all I need to do is count the hours since their last login.
(current_timstamp - lastlogin_timestamp = number of seconds since last
login)

-Sølve

PS: StarCraft rocks! ;)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
Sølve Horrigmoe                                     Tlf: 76 96 73 10
Informasjonsarkitekt                                Mob: 90 15 10 28
Presens as, avd Trondheim                          
http://www.presens.nl.no/

A supernova is the celestial equivalent of " rm -fr /* " with root
permissions




More information about the thechat mailing list