최신글 불러올때요.
본문
아래소스를 이용하여 최신글을 불러오는데요.
답변까지 같이 불러오네요.
제목만 불러올 수 없을까요?
고수님들의 답변 부탁드립니다.
<!-- <?php echo $bo_subject; ?> 최신글 시작 { -->
<div style="margin:7px 0 0 14px; border:0px solid #000; width:100%;">
<table border="0" width="93%" cellspacing="0" cellpadding="0">
<tr>
<td height="0" colspan="2"></td>
</tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td height="27" width="290" align="left">
<nobr style='display:block; overflow:hidden; width:220;'>
<img src='/skin/latest/community_basic/img/blot.gif' valign="middle" width=4 height=4>
<a href='<?=$list[$i][href]?>'><?=$list[$i][subject]?></a>
<span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'><?=$list[$i][comment_cnt]?></span>
</nobr>
</td>
<td width="150" align="right"><font color="222"><b>[<?=$list[$i][datetime]?>]</b></font></td>
</tr>
<? if ($i < $rows-1) { echo "<tr><td background='/skin/latest/community_basic/img/dot_line.gif' colspan=2></td></tr>"; } ?>
<? } ?>
<? if (count($list) == 0) { ?>
<tr>
<td align="center" height="30" background="/skin/latest/community_basic/img/board_bg_line.gif">
게시물이 없습니다.
</td>
</tr>
<? } ?>
</table>
</div>
<!-- } <?php echo $bo_subject; ?> 최신글 끝 -->
!-->
답변 3
답변이 코멘트가 아니라 답글을 말하는거라면
다른 게시판 최신글도 답변 제외되도 상관없다면 /lib/latest.lib 에서 아래 부분을..
$sql = " select * from {$tmp_write_table} where wr_is_comment = 0 order by wr_num limit 0, {$rows} ";
이렇게 수정..
$sql = " select * from {$tmp_write_table} where wr_is_comment = 0 and wr_reply = '' order by wr_num limit 0, {$rows} ";
그냥 코멘트 숫자를 말하는거라면 윗분 말씀처럼 여기 삭제..
<span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'><?=$list[$i][comment_cnt]?></span>
댓글을 직접적으로 불러오는 코드는 없고, 댓글 갯수를 불러오는 코드가 있는 것 같은데요...?
<?=
$list
[
$i
][comment_cnt]?> 이부분
을 삭제해 주세요
답변을 작성하시기 전에 로그인 해주세요.