Home > Backend Development > PHP Tutorial > php插入timestamp类型显示0000-00-00 00:00:00

php插入timestamp类型显示0000-00-00 00:00:00

WBOY
Release: 2016-06-20 12:46:10
Original
1909 people have browsed it





回复讨论(解决方案)

add_time这个字段插入的值都是0000 ,post过来的参数看着又没问题,不知道哪里原因,求帮忙

插入的时候确认有这个字段么?看着怎么像默认值呢?

imestamp 数据类型只是递增的数字,不保留日期或时间。 若要记录日期或时间,请使用 datetime 数据类型。、

看看这个帖子:
http://bbs.csdn.net/topics/310169896

一个表中,只能有一个可on update CURRENT_TIMESTAMP的Timestamp字段,其他的TIMESTAMP字段都不会自动更新的。

嗯,谢谢大家。已经解决了。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template