채택완료
최신글 추출 중 하나의 게시판에만 댓글 여부
최신글 추출 한 게시판 3개 중 하나의 게시판에만 댓글 여부를 넣고싶은데 어떻게해야 할까요 ㅜ?
php if else 넣어야되나요?
<th scope="col">댓글여부</th>
<td class="td_comment">답변대기</td> 또는 <td class="td_comment">답변완료</td>
view.skin.php 에서는 나와여 ㅜㅜ
답변 3개 / 댓글 6개
채택된 답변
+20 포인트
답변에 대한 댓글 5개
<?php if ($bo_table == 'A') { ?>
<?php
$row_adm = sql_fetch(" select count(*) as cnt from $write_table where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = 1 and mb_id = 'admin' ");
if ($row_adm['cnt']) {
echo "<span class='wr_3_1'>답변완료</span>";
} else {
echo "<span class='wr_3_2'>답변대기</span>";
}
?>
<?php } ?>
<?php
$row_adm = sql_fetch(" select count(*) as cnt from $write_table where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = 1 and mb_id = 'admin' ");
if ($row_adm['cnt']) {
echo "<span class='wr_3_1'>답변완료</span>";
} else {
echo "<span class='wr_3_2'>답변대기</span>";
}
?>
<?php } ?>
답변을 작성하려면 로그인이 필요합니다.