답변 3개 / 댓글 2개
검색해서 이렇게하니되네요 혹 다른분도 참고하세요.^^
list.skin.php
<?php
// 비밀댓글 제외하고 댓글수 뽑기
$u_reply = sql_fetch("select count(*) as cnt from {$write_table} where wr_num = '{$list[$i]['wr_num']}' and wr_is_comment = 1 and wr_option = ''");
if ($u_reply['cnt']) { ?>
<span class="sound_only">댓글</span><span class="cnt_cmt">+ <?php echo $u_reply['cnt']; ?></span><span class="sound_only">개</span>
<?php } ?>
view.skin.php
<?php
// 비밀댓글 제외하고 댓글수 뽑기
$u_reply = sql_fetch("select count(*) as cnt from {$write_table} where wr_num = '{$view['wr_num']}' and wr_is_comment = 1 and wr_option = ''");
if ($u_reply['cnt']) { ?>
<strong><a href="#bo_vc"> <i class="fa fa-commenting-o" aria-hidden="true"></i>
<?php echo number_format($u_reply['cnt']) ?>건</a></strong>
<?php } ?>
혹 더 좋은 방법 아시분 댓글 환영합니다^^;
해당 부분은 소스를 전체다 얻기 보다는 select 컬럼 비밀 체크시 반영되어지는 컬럼을 보시고 그에 따른 부분을 count 안하시는 조건으로 처리하시면 됩니다.
답변을 작성하려면 로그인이 필요합니다.