특정그룹만 지난달 게시글,코멘트,로그인 순위5위 표시하기! 정보
특정그룹만 지난달 게시글,코멘트,로그인 순위5위 표시하기!본문
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=10588
↑ 게시물은 '지난달 게시글,코멘트,로그인 순위5위 표시' 소스입니다..
위 소스에서 '특정그룹의 게시글' 순위 적용할려면 어떤 코드를 추가해야 될까요??
↑ 게시물은 '지난달 게시글,코멘트,로그인 순위5위 표시' 소스입니다..
위 소스에서 '특정그룹의 게시글' 순위 적용할려면 어떤 코드를 추가해야 될까요??
댓글 전체
//글쓰기 랭킹
$sql_common = " from $g4[board_new_table] a, $g4[member_table] b "; //where mb_level < 10 ";
$sql_common = $sql_common . " where a.bn_datetime like '" . $lastmonth . "%' ";
$sql_common = $sql_common . " and a.mb_id <> ''";
$sql_common = $sql_common . " and a.wr_id = a.wr_parent ";
$sql_common = $sql_common . " and a.mb_id = b.mb_id ";
$sql_common = $sql_common . " and b.mb_level < 10 ";
$sql_order = " order by cnt desc ";
부분을 아래와 같이 변경하시면 될듯 합니다
$sql_common = " from $g4[board_new_table] a, $g4[member_table] b , $g4['board_table'] c "; //where mb_level < 10 "; 추가
$sql_common = $sql_common . " where a.bn_datetime like '" . $lastmonth . "%' ";
$sql_common = $sql_common . " and a.mb_id <> ''";
$sql_common = $sql_common . " and a.wr_id = a.wr_parent ";
$sql_common = $sql_common . " and a.mb_id = b.mb_id ";
$sql_common = $sql_common . " and b.mb_level < 10 ";
$sql_common = $sql_common . " AND a.bo_table = c.bo_table "; //추가
$sql_common = $sql_common . " AND c.gr_id = '원하시는그룹아이디'"; //추가
$sql_order = " order by cnt desc ";
$sql_common = " from $g4[board_new_table] a, $g4[member_table] b "; //where mb_level < 10 ";
$sql_common = $sql_common . " where a.bn_datetime like '" . $lastmonth . "%' ";
$sql_common = $sql_common . " and a.mb_id <> ''";
$sql_common = $sql_common . " and a.wr_id = a.wr_parent ";
$sql_common = $sql_common . " and a.mb_id = b.mb_id ";
$sql_common = $sql_common . " and b.mb_level < 10 ";
$sql_order = " order by cnt desc ";
부분을 아래와 같이 변경하시면 될듯 합니다
$sql_common = " from $g4[board_new_table] a, $g4[member_table] b , $g4['board_table'] c "; //where mb_level < 10 "; 추가
$sql_common = $sql_common . " where a.bn_datetime like '" . $lastmonth . "%' ";
$sql_common = $sql_common . " and a.mb_id <> ''";
$sql_common = $sql_common . " and a.wr_id = a.wr_parent ";
$sql_common = $sql_common . " and a.mb_id = b.mb_id ";
$sql_common = $sql_common . " and b.mb_level < 10 ";
$sql_common = $sql_common . " AND a.bo_table = c.bo_table "; //추가
$sql_common = $sql_common . " AND c.gr_id = '원하시는그룹아이디'"; //추가
$sql_order = " order by cnt desc ";
감사합니다.. ^-^
처음에는 오류가 나서 이상하다 했었는데..
$g4['board_table'] c 부분을 $g4[board_table] c 로 바꾸니..
정상적으로 잘되네요!! 감사합니다~~~
처음에는 오류가 나서 이상하다 했었는데..
$g4['board_table'] c 부분을 $g4[board_table] c 로 바꾸니..
정상적으로 잘되네요!! 감사합니다~~~