new.php에서 원하는 게시만 몇개만 선택이 가능할까요??

new.php에서 원하는 게시만 몇개만 선택이 가능할까요??

QA

new.php에서 원하는 게시만 몇개만 선택이 가능할까요??

본문

지금 현재

A,B,C,D,E 게시판이있는데

A,B만 새글로 땡겨오고싶어요(코멘트제외)

 

근데 게시판 선택은


$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 ";

 

여기서 바꿔야하는것같기도한대 혹시 관련 조언을 해주실 수 있나요?

추가)코멘트는 안가져오는 부분도..작성글만 ㅠ

 

 

이 질문에 댓글 쓰기 :

답변 1

테이블 'A', 'B' 

가 bo_table 의 내용이라고 가정하고

 


$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 ('A','B') 
and b.wr_is_comment = '0'
";

혹시 ㅠ안되서그러는데 틀린부분이 있나요..?ㅠ


$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'";

$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'";

답변을 작성하시기 전에 로그인 해주세요.
전체 14,971
QA 내용 검색
filter #php ×

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT