예를들어, 아래 링크의 그룹 최신글 스킨을 사용한다고 했을 때, 두개 이상의 그룹들로 부터 최신글을 추출하는 방법을 알고 싶습니다. 부탁합니다.
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=84115&sca=%C3%D6%BD%C5%B1%DB&sfl=wr_subject&stx=%B1%D7%B7%EC&sop=and
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=84115&sca=%C3%D6%BD%C5%B1%DB&sfl=wr_subject&stx=%B1%D7%B7%EC&sop=and
댓글 2개
extend/group.lib.php 중에
$sqlgroup = " select bo_table, bo_subject from $g4[board_table] where gr_id = '$gr_id' and bo_use_search=1 order by bo_order_search";
==>
$sqlgroup = " select bo_table, bo_subject from $g4[board_table] where gr_id in ($gr_id) and bo_use_search=1 order by bo_order_search";
로 바꾸시고
latest_group( 'skin', " ( 'a_group','b_group','c_group') ", .... )
식으로 해 보세요.
$sqlgroup = " select bo_table, bo_subject from $g4[board_table] where gr_id = '$gr_id' and bo_use_search=1 order by bo_order_search";
==>
$sqlgroup = " select bo_table, bo_subject from $g4[board_table] where gr_id in ($gr_id) and bo_use_search=1 order by bo_order_search";
로 바꾸시고
latest_group( 'skin', " ( 'a_group','b_group','c_group') ", .... )
식으로 해 보세요.
rolo님 감사 합니다만, 에러가 나네요.
그래서, 여러가지 방법을 강구하다가 아래 링크의 전체 그룹 최신글의 스킨을 이용해서 불필요한 그룹아이디를 제거하는 형태로 구현했습니다.
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=83759&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%C1%A6%BF%DC&sop=and&page=4
우선, lib/gnuwiki.lib.php에서
// 전체 최신글
$sql = "SELECT B.bo_subject, N.bo_table, N.wr_id, DATE_FORMAT(N.bn_datetime, '%y.%c.%e(%k:%i)') as bn_datetime
FROM $g4[board_new_table] N, $g4[board_table] B, $g4[group_table] G
WHERE N.wr_id = N.wr_parent AND N.bo_table = B.bo_table AND G.gr_id = B.gr_id ";
이 부분의 끝에다가
and B.gr_id !='ent' and B.gr_id !='expert' and B.gr_id !='news' and B.gr_id !='market'and B.gr_id !='service' 이런식으로 그룹 아이디를 제거하는 방법을 사용하니까 그런대로 되더군요.
어쨋거나 수고해 주셔서 감사 드립니다.
그래서, 여러가지 방법을 강구하다가 아래 링크의 전체 그룹 최신글의 스킨을 이용해서 불필요한 그룹아이디를 제거하는 형태로 구현했습니다.
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=83759&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%C1%A6%BF%DC&sop=and&page=4
우선, lib/gnuwiki.lib.php에서
// 전체 최신글
$sql = "SELECT B.bo_subject, N.bo_table, N.wr_id, DATE_FORMAT(N.bn_datetime, '%y.%c.%e(%k:%i)') as bn_datetime
FROM $g4[board_new_table] N, $g4[board_table] B, $g4[group_table] G
WHERE N.wr_id = N.wr_parent AND N.bo_table = B.bo_table AND G.gr_id = B.gr_id ";
이 부분의 끝에다가
and B.gr_id !='ent' and B.gr_id !='expert' and B.gr_id !='news' and B.gr_id !='market'and B.gr_id !='service' 이런식으로 그룹 아이디를 제거하는 방법을 사용하니까 그런대로 되더군요.
어쨋거나 수고해 주셔서 감사 드립니다.
게시글 목록
| 번호 | 제목 |
|---|---|
| 284438 | |
| 284437 | |
| 284435 | |
| 284430 | |
| 284420 | |
| 284417 | |
| 284409 | |
| 284401 | |
| 284399 | |
| 284397 | |
| 284380 | |
| 284378 | |
| 284371 | |
| 284370 | |
| 284366 | |
| 284364 | |
| 284360 | |
| 284357 | |
| 284355 | |
| 284354 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기