DECIMAL length for microtime(true)?

后端 未结 4 1034
轮回少年
轮回少年 2021-02-14 03:48

I want to store PHP\'s microtime as my timestamp in MySQL.

I\'ve been told it\'s best to store it in DECIMAL, but I can\'t find an ideal size.

Does

4条回答
  •  清歌不尽
    2021-02-14 04:35

    Why don't you just store it as a float? That's what microtime(true) returns, so it's the best candidate.

提交回复
热议问题