MySql
$created = date('Y-m-d H:i:s'); // cast()を使って文字列をdatetimeに変換してinsertする $query = "insert into hoge(aaa, bbb, created) values(?, ?, cast(? as datetime))"; $stmt = $mysqli->prepare($query);$stmt->bind_param('sss', $para1, $para…
$created = date('Y-m-d H:i:s'); // cast()を使って文字列をdatetimeに変換してinsertする $query = "insert into hoge(aaa, bbb, created) values(?, ?, cast(? as datetime))"; $stmt = $mysqli->prepare($query);$stmt->bind_param('sss', $para1, $para…