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

최근게시물에 복사글도 노출되게 하고싶습니다. 채택완료

루벤 7년 전 조회 2,723

제목그대로 최근게시물에 복사된 글도 노출되고 하고싶습니다.

move_update.php파일에 이동된 글은 노출되는것같은데 복사글은 확인이 안되서요.

복사해서 수정해서 작성한 글들도 노출하고싶은데 방법 좀 알려주세요..!

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

답변 3개

채택된 답변
+20 포인트
잉끼s
7년 전

move_update.php

</p>

<p>

                if ($sw == 'move' && $i == 0)

                {

                    // 스크랩 이동

                    sql_query(" update {$g5['scrap_table']} set bo_table = '$move_bo_table', wr_id = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");</p>

<p>                    // 최신글 이동

                    /*

                    sql_query(" update {$g5['board_new_table']} set bo_table = '$move_bo_table', wr_id = '$save_parent', wr_parent = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");

                    */

                    // 추천데이터 이동

                    sql_query(" update {$g5['board_good_table']} set bo_table = '$move_bo_table', wr_id = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");

                }

                sql_query(" insert into {$g5['board_new_table']} ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '{$move_bo_table}', '{$insert_id}', '{$save_parent}', '".G5_TIME_YMDHIS."', '{$row2['mb_id']}' ) ");

             </p>

<p>

 

 

아래 구문을 주석 처리하시고 

</p>

<p>sql_query(" update {$g5['board_new_table']} set bo_table = '$move_bo_table', wr_id = '$save_parent', wr_parent = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");</p>

<p>

 

 

if문 밖에 아래 구문 넣으시면 됩니다.

</p>

<p>sql_query(" insert into {$g5['board_new_table']} ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '{$move_bo_table}', '{$insert_id}', '{$save_parent}', '".G5_TIME_YMDHIS."', '{$row2['mb_id']}' ) ");</p>

<p>

 

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

답변에 대한 댓글 3개

루벤
7년 전
답변 감사합니다.
말씀하신대로 적용했는데 반영되지가 않네요...ㅜ
잉기
7년 전
그런가요?
현재 님이 원하시는 기능을 작업한거고 제대로 동작에 있는 소스입니다.
다시 한번 더 확인을 해보아도 수정된 분은 저부분 뿐입니다.
루벤
7년 전
[code]
if ($sw == 'move' && $i == 0)
{
// 스크랩 이동
sql_query(" update {$g5['scrap_table']} set bo_table = '$move_bo_table', wr_id = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");

// 최신글 이동
/*sql_query(" update {$g5['board_new_table']} set bo_table = '$move_bo_table', wr_id = '$save_parent', wr_parent = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");*/

// 추천데이터 이동
sql_query(" update {$g5['board_good_table']} set bo_table = '$move_bo_table', wr_id = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");
}
}
else
{
$count_comment++;

if ($sw == 'move')
{
// 최신글 이동
sql_query(" update {$g5['board_new_table']} set bo_table = '$move_bo_table', wr_id = '$insert_id', wr_parent = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");
}
}

sql_query(" update $move_write_table set wr_parent = '$save_parent' where wr_id = '$insert_id' ");
sql_query(" insert into {$g5['board_new_table']} ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '{$move_bo_table}', '{$insert_id}', '{$save_parent}', '".G5_TIME_YMDHIS."', '{$row2['mb_id']}' ) ");

[/code]

위처럼 넣었거든요..
잘못된걸까요ㅠㅠ

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

잉끼s
7년 전

</p>

<p>    if ($sw == 'move' && $i == 0)

    {

        // 스크랩 이동

        sql_query(" update {$g5['scrap_table']} set bo_table = '$move_bo_table', wr_id = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");

        

        // 최신글 이동

        /*sql_query(" update {$g5['board_new_table']} set bo_table = '$move_bo_table', wr_id = '$save_parent', wr_parent = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");*/

        

        // 추천데이터 이동

        sql_query(" update {$g5['board_good_table']} set bo_table = '$move_bo_table', wr_id = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");

    }

    sql_query(" insert into {$g5['board_new_table']} ( bo_table, wr_id, wr_parent, bn_datetime, mb_id ) values ( '{$move_bo_table}', '{$insert_id}', '{$save_parent}', '".G5_TIME_YMDHIS."', '{$row2['mb_id']}' ) ");

}

else

{

    $count_comment++;

    

    if ($sw == 'move')

    {

        // 최신글 이동

        sql_query(" update {$g5['board_new_table']} set bo_table = '$move_bo_table', wr_id = '$insert_id', wr_parent = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");

    }

}</p>

<p>sql_query(" update $move_write_table set wr_parent = '$save_parent' where wr_id = '$insert_id' ");</p>

<p>

 

 

이렇게 넣으셔야죠

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

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

플라이
7년 전

최신글은 등록시 날짜 부분이 오늘날짜로 반영되면 최신글로 될텐데 지금 복사한 날짜 기준으로 날짜가 등록되어 그런듯 합니다.

move_update.php 에서 wr_datetime 필드 부분을 오늘날짜로 적용해 주시면 최신글로 등록반영됩니다.

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

답변에 대한 댓글 1개

루벤
7년 전
해당 부분 좀 더 구체적으로 알려주실 수 있을까요ㅠ

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

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

로그인