이전 목록 다음
미채택 완료

여기 left join 이유?

2016-04-11 (월) 09:40:46 9,964

파일명 : lib/shop.lib.php  293째줄 정도에서요 

left join 하는 이유가??? 궁금합니다^^

            if ($this->event) {

                $sql_select = " select {$this->fields} ";

                $sql_common = " from `{$g5['g5_shop_event_item_table']}` a left join `{$g5['g5_shop_item_table']}` b on (a.it_id = b.it_id) ";

                $where[] = " a.ev_id = '{$this->event}' ";


답변 1개 / 댓글 1개

g5_shop_event_item_table 는 이벤트 테이블이고 

g5_shop_item_table 상품테이블인데

상품에 이벤트가 걸려있다면 상품정보도 찾으려고 레프트 조인으로 묶었네요. 

 


답변에 대한 댓글 1개

2016-04-13 (수) 11:47:25
시간내어 주셔서 감사한데요
일반 inner join으로 사용하지 않는 이유가 궁금합니다.^^

답변을 작성하려면 로그인이 필요합니다.