분류문제 채택완료
qa라는 게시판에는 질문|선택
이 두개의 분류만 게시판 설정에서 설정하여 사용중이고
별도로 "해결"이란 분류를 만들어 skin에서 추가로 나오도록 햇습니다.
글을 쓰면 질문글이 올라가게되고 댓글을 달면 그 댓글을 보고 글쓴이가 채택을 하는 구조입니다.
이 채택을 하면 sql update 로 ca_name = "해결"을 넣는데
이게 문제가 되는건지 게시판상에서 질문또는 선택 분류 선택시 해결의 분류까지 보이네요......
업데이트 코드는 아래와 같습니다.
sql_query("update $write_table set ca_name = '해결', wr_qa = '$comment_id' where wr_id = '$wr_id'");
답변 1개
위에 쿼리는 게시판에 해당하는 전체 게시글을 '해결' 카테고리로 변경하게끔 되어있습니다.
조건을 추가하여 원하는 no(http://uws64-189.cafe24.com/WebMysql/sql.php?db=thdckdghd&table=g5_write_notice&token=9513c312f65c3ae700ec3be762f2c50f&sql_query=SELECT+%2A+FROM+%60g5_write_notice%60+ORDER+BY+%60g5_write_notice%60.%60wr_id%60+ASC" title="정렬" style="text-decoration: none; color: rgb(0, 0, 255); font-family: sans-serif; font-size: 13.1199998855591px; font-weight: bold; line-height: normal; text-align: center;">wr_id) 만 변경되도록 해야 합니다.
update $write_table set ca_name = '해결', wr_qa = '$comment_id' where wr_id = '$wr_id' and http://uws64-189.cafe24.com/WebMysql/sql.php?db=thdckdghd&table=g5_write_notice&token=9513c312f65c3ae700ec3be762f2c50f&sql_query=SELECT+%2A+FROM+%60g5_write_notice%60+ORDER+BY+%60g5_write_notice%60.%60wr_id%60+ASC" title="정렬" style="text-decoration: none; color: rgb(0, 0, 255); font-family: sans-serif; font-size: 13.1199998855591px; font-weight: bold; line-height: normal; text-align: center;">wr_id=$http://uws64-189.cafe24.com/WebMysql/sql.php?db=thdckdghd&table=g5_write_notice&token=9513c312f65c3ae700ec3be762f2c50f&sql_query=SELECT+%2A+FROM+%60g5_write_notice%60+ORDER+BY+%60g5_write_notice%60.%60wr_id%60+ASC" title="정렬" style="text-decoration: none; color: rgb(0, 0, 255); font-family: sans-serif; font-size: 13.1199998855591px; font-weight: bold; line-height: normal; text-align: center;">wr_id
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
그정도는 이미 테스트는 했습니다.
단지 분류가 질문으로 올라온글을 위 업데이트로 해결로 분류를 바꿨을경우
게시판 상단 분류탭에서 질문을 클릭해도 해당 게시판이 보인다는 겁니다.
물론 해결탭을 선택해도 보이구요.
업데이트로 ca_name 에는 정상적으로 질문이란 값은 사라지고 해결이 들어가잇음에도 불구하고 질문탭에서 이글이 보이는게 문제입니다.