index 최신글이 3번반복?? 채택완료
인덱스파일에 "내용" 넣은것이 3번 반복돼요
그래서 아래를 지우니 아무것도 내용도 안보입니다.
어떻게 처리해야할까요?
도움 좀 부탁드립니다. ^^
$sql = " select bo_table from `{$g5['board_table']}` a left join `{$g5['group_table']}` b on (a.gr_id=b.gr_id) where a.bo_device <> 'mobile' "; if(!$is_admin) $sql .= " and a.bo_use_cert = '' "; $sql .= " order by b.gr_order, a.bo_order "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) { if ($i%2==1) $lt_style = "margin-left:0px"; else $lt_style = ""; ?>
답변 2개
http://sir.co.kr/qa/?wr_id=48541&stx=index&sst=wr_num&unanswered=0&s_tag=">http://sir.co.kr/qa/?wr_id=48541&stx=index&sst=wr_num&unanswered=0&s_tag=
or
http://sir.co.kr/bbs/board.php?bo_table=g5_tip&wr_id=1064&sfl=mb_id%2C1&stx=ogogago">http://sir.co.kr/bbs/board.php?bo_table=g5_tip&wr_id=1064&sfl=mb_id%2C1&stx=ogogago
<h2 class="sound_only">최신글</h2></p><p><!-- 최신글 시작 { --></p><p><?php</p><p>// 최신글</p><p>$sql = " select bo_table</p><p> from `{$g5['board_table']}` a left join `{$g5['group_table']}` b on (a.gr_id=b.gr_id)</p><p> where a.bo_device <> 'mobile' ";</p><p>if(!$is_admin)</p><p> $sql .= " and a.bo_use_cert = '' ";</p><p>$sql .= " order by b.gr_order, a.bo_order ";</p><p>$result = sql_query($sql);</p><p>for ($i=0; $row=sql_fetch_array($result); $i++) {</p><p> if ($i%2==1) $lt_style = "margin-left:20px";</p><p> else $lt_style = "";</p><p>?></p><p> <div style="float:left;<?php echo $lt_style ?>"></p><p> <?php</p><p> // 이 함수가 바로 최신글을 추출하는 역할을 합니다.</p><p> // 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);</p><p> echo latest("basic", $row['bo_table'], 5, 25);</p><p> ?></p><p> </div></p><p><?php</p><p>}</p><p>?></p><p><!-- } 최신글 끝 -->
최신글 소스에서
echo latest("basic", $row['bo_table'], 5, 25);
이 부분은 건드리면 안됩니다.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인