prepare($sql); $stmh->execute(); $row = $stmh->fetch(PDO::FETCH_ASSOC); $num=$row["num"]; print "마지막 레코드 번호 : " . $num; } catch (PDOException $Exception) { print "오류: ".$Exception->getMessage(); } header("Location:/motor/view.php?num=$num&page=$page&search=$search&find=$find&process=$process&yearcheckbox=$yearcheckbox&year=$year&fromdate=$fromdate&todate=$todate&separate_date=$separate_date"); ?>