dousi4148
dousi4148
2010-05-23 19:29
浏览 105
已采纳

如何在PHP中创建以mysql TIMESTAMP类型存储的时间?

How do I create time to be store as mysql TIMESTAMP type, in PHP?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • duanfen7676
    duanfen7676 2010-05-23 19:32
    已采纳

    On the PHP side, you can use the date function:

    $date = date('Y-m-d H:i:s');

    点赞 评论
  • dongshi1424
    dongshi1424 2010-05-23 19:31

    use now() in select query.

    like this,

       dattime = now();
    
    点赞 评论

相关推荐