prepare($sql); $stmh->bindValue(1, $num, PDO::PARAM_STR); $stmh->execute(); $row = $stmh->fetch(PDO::FETCH_ASSOC); $update_log=$row["update_log"]; }catch (PDOException $Exception) { print "오류: ".$Exception->getMessage(); } $data=date("Y-m-d H:i:s") . " - " . $_SESSION["name"] . " " ; $update_log = $data . $update_log . " "; // 개행문자 Textarea try{ $pdo->beginTransaction(); $sql = "update " . $DB . ".work set measureday=?, update_log=? where num=? LIMIT 1"; $stmh = $pdo->prepare($sql); $stmh->bindValue(1, $measureday, PDO::PARAM_STR); $stmh->bindValue(2, $update_log, PDO::PARAM_STR); $stmh->bindValue(3, $num, PDO::PARAM_STR); //고유키값이 같나?의 의미로 ?로 num으로 맞춰야 합니다. where 구문 $stmh->execute(); $pdo->commit(); } catch (PDOException $Exception) { $pdo->rollBack(); print "오류: ".$Exception->getMessage(); } // echo ''; header("Location:https://dh2024.co.kr/p/view.php?num=$num&check=$check"); ?>