Posted by brant : 2009-10-05 at 6:17 pm
MySQL queries that use SUM(time) may notice that it doesn't work as intended, so a workaround is clearly neccessary. I Googled for the answer and was pleased to find one that does infact work perfectly. Stoyan Stefanov was nice enough to post the workaround on the MySQL site. Below is the trick which results in the following format: 00:00:00.
SELECT SEC_TO_TIME( SUM( TIME_TO_SEC( `time` ) ) ) AS total_time FROM time_table;
Similar Blogs:
Enable Remote Access To MySQL With WHM / Cpanel Hosting Packages
Optimize Your Queries!
Awstats Will Lag Your Box
blog comments powered by Disqus
Blog Posts
- The Sad Truth About SEOBook
- Firefox Had Its Chance, It's Time For Google Chrome
- Cancel Your FreeCreditReport.com Account Without Calling
- Automate Wordpress Posting
- MySQL, How To SUM Time Correctly
« Previous
Recent Popular Posts
Most Commented Blog Posts
- Nintendo Wii Sucks (228)
- Microsoft Windows Search Indexer Stopped Working (32)
- GMX Mail Review (31)
- Windows Vista 0x80070017 Error (16)
- How To Block Ad-Brite Transition Ads (14)
Search
NJ Beach Checker
| March 2010 | ||||||
| S | M | T | W | T | F | S |
| 28 | 1 | 2 | 3 | 4 | 5 | 6 |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 | 1 | 2 | 3 |
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| « last | next » |
| beach days: | 52/131 (39.69%) |
| perfect beach days: | 6/52 (11.54%) |
| bad beach days: | 79/131 (60.31%) |
| best beach streak: | 3 |
| worst beach streak: | 10 days |
| avg temp: | 78.77° |
| avg wind: | 12.65 mph |
| avg water temp: | 70.7° |
