new.php에서 원하는 게시만 몇개만 선택이 가능할까요?? 채택완료
바트컨트롤
7년 전
조회 1,794
지금 현재
A,B,C,D,E 게시판이있는데
A,B만 새글로 땡겨오고싶어요(코멘트제외)
근데 게시판 선택은
</p>
<p>$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 b.bo_use_search = 1 ";</p>
<p>
여기서 바꿔야하는것같기도한대 혹시 관련 조언을 해주실 수 있나요?
추가)코멘트는 안가져오는 부분도..작성글만 ㅠ
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
채택된 답변
+20 포인트
7년 전
테이블 'A', 'B'
가 bo_table 의 내용이라고 가정하고
</p>
<p>$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 b.bo_use_search = 1</p>
<p>and a.bo_table in ('A','B') </p>
<p>and b.wr_is_comment = '0'</p>
<p>";</p>
<p>
로그인 후 평가할 수 있습니다
답변에 대한 댓글 3개
�
바트컨트롤
7년 전
�
플래토
7년 전
$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 b.bo_use_search = 1
and a.bo_table in ('coin_01','coin_new2') and b.wr_is_comment = '0'";
where a.bo_table = b.bo_table
and b.gr_id = c.gr_id
and b.bo_use_search = 1
and a.bo_table in ('coin_01','coin_new2') and b.wr_is_comment = '0'";
�
바트컨트롤
7년 전
아!!
테이블명이구나
a.bo_table in ('coin_01','coin_new2') "; 이렇게 하니깐 되네요!ㅠㅠㅠ감사합니다
테이블명이구나
a.bo_table in ('coin_01','coin_new2') "; 이렇게 하니깐 되네요!ㅠㅠㅠ감사합니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
[code]
$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 b.bo_use_search = 1 and a.bo_table in ('g5_write_coin_01','g5_write_coin_new2') and b.wr_is_comment = '0'";
[/code]