다시 한번 질문 합니다....ㅜㅜ

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
다시 한번 질문 합니다....ㅜㅜ

QA

다시 한번 질문 합니다....ㅜㅜ

본문

질문답변 게시판 리스트에서, 아래 소스처럼 하여 관리자가 답변을 하면 "답변*건"이라고 출력이 되는데,
이것을 관리자뿐만 아니라, 일반회원 혹은 특정레벨이상의 회원이 답변했을 경우 모두 "답변*건"이라고 출력하고
싶습니다. 고수님들 소스로 알려주시면 감사하겠습니다.ㅜㅜ
 
아래 소스:
 
    <?
        if (!$list[$i][is_notice]) { // 공지사항
     //관리자 답변 코멘트 유무 체크
   $sqlc = " select count(*) as cnt from $write_table where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = '1' and (mb_id = 'jeongbo') ";
   $rowc = sql_fetch($sqlc);
   $total_coment = $rowc[cnt];
   if ($total_coment) {
   $e_text = array("(",")"); //괄호 표시
    $list[$i][comment_cnt] = str_replace($e_text, "", $list[$i][comment_cnt]); //괄호 표시 변환으로 삭제
    $list[$i][is_ncoment] = "<font class='s11 color_pink2'>답변 <b>".number_format($total_coment)."</b>건</font>"; //관리자 답변이 있을경우
   } else {
    $list[$i][is_ncoment] = "<font class='s11 color_gray1'>대 기 중</font>";
   }
  }
   $list[$i][comment_cnt]
     ?>
        <td class="good"><?=$list[$i][is_ncoment]?></td>

이 질문에 댓글 쓰기 :

답변 5



$sqlc = " select count(*) as cnt from $write_table where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = '1' and mb_id != '$member[mb_id]'  "; 



감사합니다.
그런데 뭔가 제대로 인식을 못하는것 같네요.^^
아래는 사이트 주소인데, 시간 나시면 한번 봐주십시오...ㅜㅜ
http://jeongbo-partner.com/board/bbs/board.php?bo_table=question&sfl=&page=2&page=1

아.. 글 작성자를 말씀하시는거네요.

list.skin.php 파일에서 사용하신다면..

$sqlc = " select count(*) as cnt from $write_table where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = '1' and mb_id != '{$list[$i][mb_id]}'  ";

 $sqlc = " select count(*) as cnt from $write_table where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = '1' and (mb_id = 'jeongbo') "; 


 $sqlc = " select count(*) as cnt from $write_table where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = '1' "; 

로 변경해보세요.


시누이 님,,,,
댓글 감사합니다. 알려주신 대로 변경을 하니 문제없이 답변수가 출력이 됩니다.
그런데, 제가 위에서 설명하지 않아서 죄송한데요.
더 가능 하다면, 본인의 코멘트는 제외를 한 답변수만 출력하고 싶습니다.

답변을 작성하시기 전에 로그인 해주세요.
전체 10,635
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT