제목그대로 최근게시물에 복사된 글도 노출되고 하고싶습니다.
move_update.php파일에 이동된 글은 노출되는것같은데 복사글은 확인이 안되서요.
복사해서 수정해서 작성한 글들도 노출하고싶은데 방법 좀 알려주세요..!
답변 3개 / 댓글 4개
채택된 답변
+20 포인트
7년 전
move_update.php
Copy
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']}' ) ");
아래 구문을 주석 처리하시고
Copy
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']}' ");
if문 밖에 아래 구문 넣으시면 됩니다.
Copy
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']}' ) ");
답변에 대한 댓글 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]
위처럼 넣었거든요..
잘못된걸까요ㅠㅠ
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]
위처럼 넣었거든요..
잘못된걸까요ㅠㅠ
7년 전
Copy
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']}' ");
}
}
sql_query(" update $move_write_table set wr_parent = '$save_parent' where wr_id = '$insert_id' ");
이렇게 넣으셔야죠
7년 전
최신글은 등록시 날짜 부분이 오늘날짜로 반영되면 최신글로 될텐데 지금 복사한 날짜 기준으로 날짜가 등록되어 그런듯 합니다.
move_update.php 에서 wr_datetime 필드 부분을 오늘날짜로 적용해 주시면 최신글로 등록반영됩니다.
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.
말씀하신대로 적용했는데 반영되지가 않네요...ㅜ