From 977a6de93b8f173a4c7291d2151d85bbac7c9c7b Mon Sep 17 00:00:00 2001 From: thisgun Date: Sat, 9 Jan 2021 16:42:30 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=EC=97=90=EC=84=9C?= =?UTF-8?q?=20=EC=9D=B4=EC=A0=84=EA=B8=80=20=EB=8B=A4=EC=9D=8C=EA=B8=80?= =?UTF-8?q?=EC=9D=B4=20=EB=82=98=EC=98=A4=EC=A7=80=20=EC=95=8A=EB=8A=94=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/view.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bbs/view.php b/bbs/view.php index 719f18476..d78fa7b0e 100644 --- a/bbs/view.php +++ b/bbs/view.php @@ -28,7 +28,7 @@ if (!$board['bo_use_list_view']) { $sql = " select wr_id, wr_subject, wr_datetime from {$write_table} where wr_is_comment = 0 and wr_num = '{$write['wr_num']}' and wr_reply < '{$write['wr_reply']}' {$sql_search} order by wr_num desc, wr_reply desc limit 1 "; $prev = sql_fetch($sql); // 위의 쿼리문으로 값을 얻지 못했다면 - if (isset($prev['wr_id']) && !$prev['wr_id']) { + if (! (isset($prev['wr_id']) && $prev['wr_id'])) { $sql = " select wr_id, wr_subject, wr_datetime from {$write_table} where wr_is_comment = 0 and wr_num < '{$write['wr_num']}' {$sql_search} order by wr_num desc, wr_reply desc limit 1 "; $prev = sql_fetch($sql); } @@ -37,7 +37,7 @@ if (!$board['bo_use_list_view']) { $sql = " select wr_id, wr_subject, wr_datetime from {$write_table} where wr_is_comment = 0 and wr_num = '{$write['wr_num']}' and wr_reply > '{$write['wr_reply']}' {$sql_search} order by wr_num, wr_reply limit 1 "; $next = sql_fetch($sql); // 위의 쿼리문으로 값을 얻지 못했다면 - if (isset($next['wr_id']) && !$next['wr_id']) { + if (! (isset($next['wr_id']) && $next['wr_id'])) { $sql = " select wr_id, wr_subject, wr_datetime from {$write_table} where wr_is_comment = 0 and wr_num > '{$write['wr_num']}' {$sql_search} order by wr_num, wr_reply limit 1 "; $next = sql_fetch($sql); }