时间:2021-07-01 10:21:17 帮助过:7人阅读
try
{
$conn = new PDO('sqlite:Transactioion.s3db');
$conn->beginTransaction();
for($i=0; $i<1000000; $i++)
{
$conn->exec("insert into [users] values(null,'username')");
}
$conn->commit();
}
catch(PDOException $ex)
{
$conn->rollBack();
}