27条回答 默认 最新
- python小菜 2009-01-03 16:18关注
I would always use a Unix timestamp when working with MySQL and PHP. The main reason for this being the the default date method in PHP uses a timestamp as the parameter, so there would be no parsing needed.
To get the current Unix timestamp in PHP, just do
time();
and in MySQL doSELECT UNIX_TIMESTAMP();
.解决 无用评论 打赏 举报