관리자모드에서 최신글 문제

관리자모드에서 최신글 문제

QA

관리자모드에서 최신글 문제

답변 1

본문

안녕하세요.

관리자모드 접속하자 마자 나오는

최신글 에서

글 말고 댓글을 써도 리스트가 쌓이더라구요

댓글 부분은 빼고 싶은데 

도움좀 부탁드리겠습니다.

현제 test 게시판만 불러오고 있습니다.

 


<?php
$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['group_table']} c where a.bo_table = b.bo_table and b.gr_id = c.gr_id and a.bo_table in ('test') ";
if ($gr_id) {
    $sql_common .= " and b.gr_id = '$gr_id' ";
}
if (isset($view) && $view) {
    if ($view == 'w') {
        $sql_common .= " and a.wr_id = a.wr_parent ";
    } elseif ($view == 'c') {
        $sql_common .= " and a.wr_id <> a.wr_parent ";
    }
}
$sql_order = " order by a.bn_id desc ";
$sql = " select count(*) as cnt {$sql_common} ";
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$colspan = 50;
?>

 

여기서 어느 부분을 건드려야 할지 모르겠습니다. ㅠ

이 질문에 댓글 쓰기 :

답변 1

참고하세요.

https://gnustudy.com/bbs/board.php?bo_table=gnu_tip&wr_id=328

와 이런게 있었군요 감사합니다
$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['group_table']} c where a.bo_table = b.bo_table and b.gr_id = c.gr_id and a.bo_table in ('test')  and a.wr_id = a.wr_parent";

이렇게 해서 잘 처리했습니다. 감사합니다^^

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
filter #php ×
  • 질문이 없습니다.
전체 0
© SIRSOFT
현재 페이지 제일 처음으로