开发者

Why does mysql function now() sometimes return00:00:00?

I write several mysql commands like these:

insert into news_seeds values(1, 'http://www...', 0, 0, 60, now(), 10, now());
insert into news_seeds values(2, 'http://www...', 0, 0, 60, now()-10, 10, now()-2);
insert into news_seeds values(3, 'http://www...', 0, 0, 60, now()-20, 10, now()-4);
...

but i find sometimes now 开发者_如何学编程just returns 00:00:00, why?


00:00:00 is midnight, to the second.

If it isn't midnight, you might be doing a SET TIMESTAMP before calling NOW().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜