homepage Welcome to WebmasterWorld Guest from 54.196.57.4
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

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




msg:4566724
 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 :)

 

davurs




msg:4609900
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved