Saving timestamp in mysql table using php

前端 未结 15 854
既然无缘
既然无缘 2020-12-22 21:44

I have a field in a MySQL table which has a timestamp data type. I am saving data into that table. But when I pass the timestamp (1299762201428) to

15条回答
  •  天命终不由人
    2020-12-22 22:04

    $created_date = date("Y-m-d H:i:s");
    $sql = "INSERT INTO $tbl_name(created_date)VALUES('$created_date')";
    $result = mysql_query($sql);
    

提交回复
热议问题