开发者

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

开发者 https://www.devze.com 2023-01-30 00:18 出处:网络
I write several mysql commands like these: insert into news_seeds values(1, \'http://www...\', 0, 0, 60, now(), 10, now());

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

精彩评论

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