wr_id값이
본문
코드 만지다가
wr_id값이 엉망이 되어
auto_incresment를 초기화하여 1부터 시작하게 했습니다.
잘되었는데
문제는 wr_num값과 wr_parent값은 그대로입니다..
이 wr_num을 새로 정렬한 wr_id에 준해서 다시 정리할 수 없을까요?
wr_parent값이 동일한거를 불러내고
그뒤 wr_id값이 낮은것에 맞추어 다시 wr_parent값을 부여한다던지..
wr_num값도 비슷한 방법으로 어떻게 할 수 없을까요?
답변 2
댓글은 없나요?
댓글이 아닌 글은 wr_id = wr_parent 입니다
댓글이 있으면 wr_id를 변경시켜버리면 안됩니다
wr_id 재설정해도 문제 없다면 나머지 변경 방법은 아래 쿼리 실행
sql_query("update 게시판 set wr_num = -1 * wr_id, wr_parent = wr_id ");
게시물이 남아 있는 상태에서는
auto_incresment를 초기화하여 1부터 시작하지 못할 텐데요.
답변을 작성하시기 전에 로그인 해주세요.