diff --git a/bbs/move_update.php b/bbs/move_update.php index cbef072da..7c417f606 100644 --- a/bbs/move_update.php +++ b/bbs/move_update.php @@ -80,7 +80,7 @@ while ($row = sql_fetch_array($result)) } $sql = " insert into $move_write_table - set wr_num = " . ($next_wr_num ? "'$next_wr_num'" : "(SELECT IFNULL(MIN(wr_num) - 1, -1) FROM $move_write_table sq) ") . ", + set wr_num = " . ($next_wr_num ? "'$next_wr_num'" : "(SELECT IFNULL(MIN(wr_num) - 1, -1) FROM $move_write_table as sq) ") . ", wr_reply = '{$row2['wr_reply']}', wr_is_comment = '{$row2['wr_is_comment']}', wr_comment = '{$row2['wr_comment']}', diff --git a/bbs/poll_update.php b/bbs/poll_update.php index cca29431b..d6fb5d809 100644 --- a/bbs/poll_update.php +++ b/bbs/poll_update.php @@ -3,7 +3,7 @@ include_once('./_common.php'); $po_id = isset($_POST['po_id']) ? preg_replace('/[^0-9]/', '', $_POST['po_id']) : 0; -$po = sql_fetch(" select * from {$g5['poll_table']} where po_id = '{$_POST['po_id']}' "); +$po = sql_fetch(" select * from {$g5['poll_table']} where po_id = '$po_id' "); if (! (isset($po['po_id']) && $po['po_id'])) alert('po_id 값이 제대로 넘어오지 않았습니다.');