mysql datetime时间戳时间的区别(Difference between mysql datetime timestamp time)
我想获得处理登录尝试的当前时间。 我想以大概日期和小时/分钟/秒的速度获取时间。
我有一个名为
last_attempt
的字段的数据库,它保存上次登录尝试的日期和时间。我应该将哪种类型的
Datetime
,Timestamp
,Time
或其他类型用于该字段? 还应该使用PHP中的哪种方法?I want to get the current time when a login attempt is processed. I want to get the time retrieved in probably date and hour/min/sec.
I have a database with a field called
last_attempt
, which holds the date and time of the last login attempt.Which of the types
Datetime
,Timestamp
,Time
or others should I use for the field? And also what method in PHP should I use?
原文:https://stackoverflow.com/questions/11713501
更新时间:2023-10-19 08:10