[제나플러스] bbs/group.php에서 출력 검색순서에 따른 정렬 > 팁앤테크

본문 바로가기

사이트 내 전체검색

뒤로가기 팁앤테크

[제나플러스] bbs/group.php에서 출력 검색순서에 따른 정렬

본문

위 그림처럼 좌우로
보드1 보드2로 보이고 다음 줄에서
보드3 보드4 ... 형태로 순서별로 보여집니다. 

<?
// 상대 경로
$g4_path = "..";
include_once("$g4_path/common.php");
include_once("$g4[path]/lib/latest.lib.php");
//include_once("$g4[path]/lib/gnuwiki.lib.php");

$g4[title] = $group[gr_subject];
include_once("./_head.php");
?>

 <!-- 메인화면 최신글 시작 -->
<table width="100%" cellpadding=0 cellspacing=5>
<tr>
    <td align="center" valign=top>
    <?
    //  최신글

// 테이블 명의 따른 정렬 컬럼명에 정렬하고 싶은 컬럼명으로 설정함
// 예) order by [컬럼명]
/*
    $sql = " select bo_table, bo_subject from $g4[board_table]
              where gr_id = '$gr_id'
                and bo_list_level <= '$member[mb_level]'
              order by bo_table ";
*/ 
 // 출력검색순서따른 정렬
    $sql = " select bo_table, bo_subject from $g4[board_table]
              where gr_id = '$gr_id'
                and bo_list_level <= '$member[mb_level]'
              order by bo_order_search ";
    $result = sql_query($sql);
    for ($i=0; $row=sql_fetch_array($result);) {
        // 이 함수가 바로 최신글을 추출하는 역할을 합니다.
        // 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.

        // 사용방법
        // latest(스킨, 게시판아이디, 출력라인, 글자수);
        if($i%2==0)
echo "<tr>";
?>
<td width="50%" valign="top">
<?= latest("basic", $row[bo_table], 4, 30, "4,25")?>
</td>
<?
$i++;
}
?>
</tr>
</table>

추천0

댓글목록 1

주책님의 댓글

주책쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

이것 때문에 질문도, 고생도 하였는데 수고하셔서 홈페이지가 한 결 가법네요~~!
감사 감사^^1

전체 825건 17 페이지
게시물 검색
Copyright (c) 株式会社YHPLUS. All rights reserved.

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒171-0014 東京都豊島区池袋2-41-5 アーバン154 8F
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

PC 버전으로 보기