최신게시물 날짜별로 정렬이 안되요^^ 도와주세용~~ > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

최신게시물 날짜별로 정렬이 안되요^^ 도와주세용~~ 정보

최신게시물 날짜별로 정렬이 안되요^^ 도와주세용~~

본문

공지사항  게시물 날짜를 수정했는데... 날짜별로 정렬이 안되요~~~


latestskin.php

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width='432' cellpadding='0' cellspacing='0' border='0'>
    <tr><td height='3'></td>
  </tr>
</table>
<table width="432" cellspacing="0" cellpadding="0" style='border=0' align='left' style='padding-left:22px;'>
  <tr>
        <td valign="top" align='left'>
      <table width="432" cellpadding=0 cellspacing=0 border=0>

<? for ($i=0; $i<count($list); $i++) {
//$list[$i][href] = "<a onClick=\"javascript:window.open('$g4[bbs_path]/board.php?bo_table={$bo_table}&wr_id={$list[$i][wr_id]}', 'community', 'left=150, top=50, width=650, height=600, scrollbars=1')\">";

?>
<tr>
    <td height=22 style='padding-top:5px;padding-left:0px;cursor:pointer;'><img src='<?=$latest_skin_path?>/img/la_icon.gif'>&nbsp;
            <?
            $style = "font-family:굴림; font-size:12pt; color:#134F93;";
            if ($list[$i][icon_new])
            $style = "style='font-family:굴림; font-size:9pt; color:#134F93;' ";
            $subject = "<span style='font-size:8pt; color:#134F93;'>".cut_str($list[$i][subject],50)."</span>"; //제목 글자수 자르기 - 꼭 여기서 지정하세요.
        echo $list[$i][icon_reply] . " ";
                echo " <a href=\"{$list[$i][href]}\">";
            if ($list[$i][is_notice])
                echo "{$subject}</a>";
            else
                echo "{$subject}</a>";

            if ($list[$i][comment_cnt])
                echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:굴림; font-size:9pt; color:#134F93;'>{$list[$i][comment_cnt]}</span></a>";

                echo " " . $list[$i][icon_new];
            ?>
      <td align='right' style='padding-top:6px'><font color=#808284><?=substr($list[$i][wr_datetime],0,10)?></font></td>   
    </td>
</tr>
<tr><td height=1 colspan=2 bgcolor='#E6E7E8'></td></tr>
<? } ?>

<? if (count($list) == 0) { ?><tr><td align=center height=100><font color=#D3622B>게시물이 없습니다.</a></td></tr><? } ?>

</table>
</td>
</tr>
</table>

댓글 전체

추출할때 날짜순으로 정렬해야지 출력하는 위 소스는 아무 소용없습니다
날짜를변경했다고 순서가 바뀌는 것이 아닙니다
출력 순서는 애초에 등록한 순서 그대로여서 변경 되지않기 때문입니다
latest함수에서 oeder by wr_num를 찾아서 order by wr_datetime desc로 수정하면
바뀐 날짜순으로 나옵니다(lib/latest.lib.php)
전체 7 |RSS
그누4 질문답변 내용 검색

회원로그인

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