Re: Best way to save reports, comments and suggestions welcome
| From: | Ryan A | Date: | Mon, 29 May 2006 14:29:09 +0000 |
| Subject: | Re: Best way to save reports, comments and suggestions welcome | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237026@lists.php.net to get a copy of this message | ||
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