homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Gold Sponsor 2015!
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

Milliseconds handling in MariaDB
Calculating results including milliseconds for sport events like swimming

Msg#: 4566722 posted 10:49 pm on Apr 20, 2013 (gmt 0)

Not sure where to post this, I chose the Database section.

I'm working on a simple personal training schedule script, that athletes like swimmers can use for planning.

But in such sports, results are recorded in milliseconds so it is of great importance, only it appears that this is poorly supported in SQL - or am I just looking the wrong place?

I've found numerous tips on how to create workarounds in PHP but is there really no native SQL way of handling such events?

A table could look like this
(finishing time being minutes:seconds:milliseconds):
| event_id | heat_id | athlete_id | finishing_time |
| 201304011 | 101 | 19991203-12 | 01:23:45 |

How is such time result entered most correctly?

Thanks in advance :)



Msg#: 4566722 posted 10:40 am on Sep 15, 2013 (gmt 0)

No replies :(, so I figured I'd better do some research. And it appears that it is not all that difficult: [forums.mysql.com...]
SEC_TO_TIME() does the trick.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved