답변 2개 / 댓글 5개
채택된 답변
+20 포인트
* /bbs/view_comment.php
$sql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by wr_comment, wr_comment_reply ";
->
$sql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by wr_good ";
답변에 대한 댓글 4개
그 부분은 쉽지 않습니다.
view_comment.php 에서..
쿼리 1번 방식을 2번방식으로 바꾸어..
top3 쿼리와 기존 쿼리 2번을 실행하고.. 각각 $list_top3, $list 에 담는 방법을 생각해 볼 수 있습니다. (=> 코멘트 출력 스킨에서 상단에 $list_top3 출력, 하단에 $list 출력)
이렇게 하는 경우에도 top3 댓글은 중복으로 표시될 수 있고.. 중복제거를 하려면.. 조금 더 시간이 들 수 있습니다.
view_comment.php 에서..
쿼리 1번 방식을 2번방식으로 바꾸어..
top3 쿼리와 기존 쿼리 2번을 실행하고.. 각각 $list_top3, $list 에 담는 방법을 생각해 볼 수 있습니다. (=> 코멘트 출력 스킨에서 상단에 $list_top3 출력, 하단에 $list 출력)
이렇게 하는 경우에도 top3 댓글은 중복으로 표시될 수 있고.. 중복제거를 하려면.. 조금 더 시간이 들 수 있습니다.
"desc" 를 깜빡했습니다. desc 를 추가하면 내림차순, 없으면 오름차순입니다.
$sql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by wr_good ";
->
$sql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by wr_good desc, wr_comment desc ";
$sql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by wr_good ";
->
$sql = " select * from $write_table where wr_parent = '$wr_id' and wr_is_comment = 1 order by wr_good desc, wr_comment desc ";
답변을 작성하려면 로그인이 필요합니다.