开发者

MySQL datetime how do I set it with php

I have 2 rows in my DB last_active & created_on that are both datetime stamps when I create the record how do I set created_on.

I'm assuming the Last_active would be [set] the same [way] if not how do I set that开发者_开发问答 as well?

In case you missed it in the title I'm using PHP.


insert into yourtable (last_active, created_on) values (now(), now());

Complete list of MySQL's date/time functions is here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜