📅  最后修改于: 2022-03-11 15:05:01.694000             🧑  作者: Mango
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "INSERT INTO data (open, heat, up, down)
VALUES ('1', '1', '1', '1')";
// use exec() because no results are returned
$conn->exec($sql);
echo "New record created successfully";
}
catch(PDOException $e)
{
echo $sql . "
" . $e->getMessage();
}
$conn = null;
?>