댓글에 답변댓글 체크때문에 질문 드립니다.
본문
댓글중에 답변댓글이 하나라도 안달린 댓글의 수를 구할려고 합니다.
어떻게 체크해야 할까요?
답변 3
답변댓글이 하나라도 안달린 댓글의 수??? 답변댓글이 없는 댓글수 라는 말이겠죠?
select count(*) as cnt from ( SELECT max(wr_comment_reply) as ss FROM g5_write_free WHERE wr_is_comment=1 group by wr_parent,wr_is_comment,wr_comment having ss='') aa
DB에서 체크하시면 간단합니다.
wr_comment라는 필드가 있어요~
select count(*) from 게시판_table where wr_comment = 0;
select count(*)
from Table
where wr_is_comment = 1
and wr_comment_reply > ''
답변을 작성하시기 전에 로그인 해주세요.