최신글 자동 출력시 일부게시판이나 특정그룹게시판 제외하기 > 그누4 질문답변

그누4 질문답변

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

최신글 자동 출력시 일부게시판이나 특정그룹게시판 제외하기 정보

최신글 자동 출력시 일부게시판이나 특정그룹게시판 제외하기

본문

그누 최상위에 있는 index.php에서
최신글 출력중 특정그룹이나 일부 게시판을 제외하고 싶은데
여기저기 찾다가 

http://sir.co.kr/bbs/board.php?bo_table=g4_qa&wr_id=133376

에서처럼

$sql = " select bo_table, bo_subject from $g4[board_table]
              where gr_id = '$gr_id'
              and bo_table not in ('qna', 'free')                  조건 추가하세요.
              and bo_list_level <= '$member[mb_level]'
              order by bo_table ";

적용해보면 index.php에서는 에러가 나는데요.
아래 index.php 소스에 적용할려면 어떻게 해야 할까요?





<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");

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

<!-- 메인화면 최신글 시작 -->
<table width="740" cellpadding=0 cellspacing=1>

<?    // 최신글
    $sql = " select bo_table, bo_subject from $g4[board_table] order by gr_id, bo_table ";
    $result = sql_query($sql);
    $k=0;
    echo "<tr valign='top'>";
    for ($i=0; $row=mysql_fetch_array($result); $i++) {
      $k=$k+1;
      echo "<td width=50%>";
      echo latest('basic', $row[bo_table], 5, 45);
      echo "</td>";
      if($k==2) {echo "</tr><tr valign='top'>"; $k=0;}
    }
    ?>
</tr>

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

<?
include_once("./_tail.php");
?>
  • 복사

( select a.* , ( select sum(co_count) as co_count from g4_qa_choose where mb_id=a.mb_id and bo_table = 'g4_qa' ) as q_co_count from `g4_write_g4_qa` a where wr_parent = '171508' and wr_8 != '' and wr_is_comment = 1 and CONVERT(wr_7, UNSIGNED) >= 5 group by wr_content having max(wr_7) order by CONVERT(wr_7, UNSIGNED) desc limit 3 )

1055 : Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sir.a.wr_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

error file : /15sir/bbs/board.php