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.
精彩评论