alert($modify); "; require_once("../lib/mydb.php"); $pdo = db_connect(); try{ $sql = "select * from chandj.make where num=?"; // get target record $stmh = $pdo->prepare($sql); $stmh->bindValue(1,$num,PDO::PARAM_STR); $stmh->execute(); $row = $stmh->fetch(PDO::FETCH_ASSOC); } catch (PDOException $Exception) { $pdo->rollBack(); print "오류: ".$Exception->getMessage(); } try{ $pdo->beginTransaction(); $sql = "update chandj.make set left_check=?, mid_check=?, right_check=?, done_check=?, remain_check=? "; $sql .= " where num=? LIMIT 1"; $stmh = $pdo->prepare($sql); $stmh->bindValue(1, $left_check, PDO::PARAM_STR); $stmh->bindValue(2, $mid_check, PDO::PARAM_STR); $stmh->bindValue(3, $right_check, PDO::PARAM_STR); $stmh->bindValue(4, $done_check, PDO::PARAM_STR); $stmh->bindValue(5, $remain_check, PDO::PARAM_STR); $stmh->bindValue(6, $num, PDO::PARAM_STR); $stmh->execute(); $pdo->commit(); } catch (PDOException $Exception) { $pdo->rollBack(); print "오류: ".$Exception->getMessage(); } ?>