beginTransaction(); $sql = "delete from phptest1.greet where num = ?"; $stmh = $pdo->prepare($sql); $stmh->bindValue(1,$num,PDO::PARAM_STR); $stmh->execute(); $pdo->commit(); header("Location:http://localhost/greet/list.php"); } catch (Exception $ex) { $pdo->rollBack(); print "오류: ".$Exception->getMessage(); } ?>