최신글 불러올때요.

최신글 불러올때요.

QA

최신글 불러올때요.

본문

아래소스를 이용하여 최신글을 불러오는데요.

 

답변까지 같이 불러오네요.

 

제목만 불러올 수 없을까요?

 

고수님들의 답변 부탁드립니다.


<!-- <?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>

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

회원로그인

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