Saving a UNIX timestamp in MySQL as type DOUBLE?
My function call takes some input, and throws it into a database. Usually, it's integers, but today, I need it to throw in a unix timestamp.
This overflew the FLOAT type, bu开发者_StackOverflow社区t works with type DOUBLE.
Is there anything I should be worried about by saving that 10-digit integer in type DOUBLE?
The total precision of a DOUBLE PRECISION value is approximately 16 decimal digits, so you should not worry, even if you store milliseconds or microseconds.
精彩评论