테스트 사이트 - 개발 중인 베타 버전입니다

진도가 쫙쫙나가다 그만... 채택완료

너모야민쯩까 9년 전 조회 5,134

복병을 만났습니다..유유

 

그룹최신글에서....

특정게시판 a,b,c 몇개를 뺀다면 혹시 어떻게 해야 할지요,,,

이렇게 되어 잇던데요...

 

<!-- 메인화면 최신글 시작 -->

<?php

//  최신글

$sql = " select bo_table, bo_subject

            from {$g5['board_table']}

            where gr_id = '{$gr_id}'

              and bo_list_level <= '{$member['mb_level']}'

              and bo_device <> 'pc' "; 

if(!$is_admin)

    $sql .= " and bo_use_cert = '' ";

$sql .= " order by bo_order ";

$result = sql_query($sql);

for ($i=0; $row=sql_fetch_array($result); $i++) {

    // 이 함수가 바로 최신글을 추출하는 역할을 합니다.

    // 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.

 

    // 사용방법

    // latest(스킨, 게시판아이디, 출력라인, 글자수);

    echo latest('basic', $row['bo_table'], 5, 70);

}

?>

<!-- 메인화면 최신글 끝 -->

 

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

채택된 답변
+20 포인트
그림자밟기

and bo_table not in ('a', 'b', 'c') 으로 제외할 게시판들 추가해 주세요. 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

너모야민쯩까
9년 전
아 잘되네요~ 감사합니다. 조은 밤되세요~

댓글을 작성하려면 로그인이 필요합니다.

그림자밟기

</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;"><!-- 메인화면 최신글 시작 --></p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;"><?php</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">//  최신글</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">$sql = " select bo_table, bo_subject</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">            from {$g5['board_table']}</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">            where gr_id = '{$gr_id}'</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px; margin-left: 80px;"> and bo_table not in ('a', 'b', 'c') </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px; margin-left: 80px;"><span style="font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;"> and bo_list_level <= '{$member['mb_level']}'</span></p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">              and bo_device <> 'pc' "; </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">if(!$is_admin)</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">    $sql .= " and bo_use_cert = '' ";</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">$sql .= " order by bo_order ";</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">$result = sql_query($sql);</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">for ($i=0; $row=sql_fetch_array($result); $i++) {</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;"><span style="font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">    // 이 함수가 바로 최신글을 추출하는 역할을 합니다.</span> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">    // 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;"> </p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">    // 사용방법</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">    // latest(스킨, 게시판아이디, 출력라인, 글자수);</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">    echo latest('basic', $row['bo_table'], 5, 70);</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">}</p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">?></p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;"><!-- 메인화면 최신글 끝 --></p><p style="word-break: break-all; color: rgb(72, 72, 72); font-family: 돋움, Dotum, sans-serif; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px;">

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인