View Single Post

   
  #3 (permalink)  
Old 02-28-2008, 08:35 AM
cron
 
Posts: n/a
Default Re: mysql simple DateAdd() problem


> Since all you have told us is "it aint (SIC) working" and you haven't even
> bothered to tell us what you are actually seeing, it could be just about
> anything:


No need to be rude! It was completely wrong:
I figured it out: To find a user who's logged in in the last 5 minutes
something like this works:

SELECT * FROM user WHERE (NOW() - INTERVAL 5 MINUTE) <= lastlogin ORDER
BY lastlogin;

Cheers,
Ciarán

Reply With Quote