Hey Rob, > > I have done very little SUM queries with time, can > you > > give me a quick example or any site where i can > find a > > few sample queries? > > This is basic MySQL so you should RTFM, and > generally should be asking > on a MySQL list :) Hehehe, true... Dont really like the MySql manual...its so much more complicated compared to the php manual. And dont really fancy joining a high traffic list like the mysql one just for a simple q like the above when there are so many experts here like you who take a moment to help guys like me out. I usually dont ask such basic q's anyway, although I admit the defination of a "basic q" is very different to many ppl here... > SELECT SUM( UNIX_TIMESTAMP( logout_time ) - > UNIX_TIMESTAMP( login_time ) > ) AS seconds FROM some_table WHERE user_id = 1; > > If you have MySQL >= 4.1.1 then you should probably > use the TIMEDIFF() > function. Got it, Thanks! Ryan ------ - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php