
03-22-2006, 05:58 PM
|
|
SEO Almost
|
|
Join Date: Sep 2004
Posts: 114
|
|
|
subtracting time
What's the best way to subtract timestamps in mysql? I want to see how long a user has been logged in in minutes. I have something like this right now:
select * from admin where DATE_FORMAT( CURRENT_TIMESTAMP( ) , '%H%i' ) - DATE_FORMAT( last_touch, '%H%i' ) <=5 && DATE_FORMAT( CURRENT_TIMESTAMP( ) , '%H%i' ) - DATE_FORMAT( last_touch, '%H%i' ) > 0
__________________
www.harddrivecaddy.com
|