테스트 사이트 - 개발 중인 베타 버전입니다

게시글 복사시 댓글 제외하기

기톨 1년 전 조회 4,565

게시글 복사 기능 사용시 댓글은 제외하고 복사되도록 하려면 어떻게 해야할까요??

 

bbs/move_update.php 파일 수정중에 해결되지 않아 질문 드립니다!

댓글을 작성하려면 로그인이 필요합니다.

답변 4개

기톨
1년 전

1.

$wr_id_list = isset($_POST['wr_id_list']) ? preg_replace('/[^0-9\,]/', '', $_POST['wr_id_list']) : '';

$sql = " select distinct wr_num from $write_table where wr_is_comment = 0 and wr_id in ({$wr_id_list}) order by wr_id ";

$result = sql_query($sql);

 

2.

$next_wr_num = 0;

$sql2 = " select * from $write_table where wr_num = '$wr_num' and wr_is_comment=0 order by wr_parent, wr_is_comment, wr_comment desc, wr_id ";

$result2 = sql_query($sql2);

 

3.

sql_query(" update {$g5['board_table']} set bo_count_write = bo_count_write + '$count_write' where bo_table = '$move_bo_table' ");

// sql_query(" update {$g5['board_table']} set bo_count_comment = bo_count_comment + '$count_comment' where bo_table = '$move_bo_table' ");

 

답변 감사드립니다. 위와 같이 수정하였는데 아직 해결이 되진 않았습니다! 한번 다른 쪽도 확인해보도록 하겠습니다. 감사합니다.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

1년 전

https://sir.kr/bbs/profile.php?mb_id=marscompany" onclick="return false;" rel="nofollow" target="_blank" title="마르스컴퍼니 자기소개">마르스컴퍼니 님의 답변 + https://sir.kr/bbs/profile.php?mb_id=jino0070" onclick="return false;" rel="nofollow" target="_blank" title="Min아빠 자기소개">Min아빠 님의 답변 + 다음 코드 주석처리 3가지 모두 해주면 좋겠습니다

//sql_query(" update {$g5['board_table']} set bo_count_comment = bo_count_comment + '$count_comment' where bo_table = '$move_bo_table' ");

 

그냥 두어도 되지만 그냥 두면 불필요한 쿼리를 실행하게 되겠습니다

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

M
1년 전

복사를 하실때 wr_is_comment=0 인것만 복사를 하시면 됩니다.

 

</p>

<p>$sql2 = " select * from $write_table where wr_num = '$wr_num' and wr_is_comment=0 order by wr_parent, wr_is_comment, wr_comment desc, wr_id ";</p>

<p>

 

이렇게 바꾸시면 됩니다.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

1년 전

확실하지는 않습니다.

 

$sql = " select distinct wr_num from $write_table where wr_id in ({$wr_id_list}) order by wr_id ";

$sql = " select distinct wr_num from $write_table where wr_is_comment = 0 and wr_id in ({$wr_id_list}) order by wr_id ";

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인