주문내역출력 문의 드립니다.

주문내역출력 문의 드립니다.

QA

주문내역출력 문의 드립니다.

답변 2

본문

/adm/shop_admin/orderprintresult.php 파일에서 주문내역을 출력하고 엑셀로 저장 하는 기능이 있습니다.

 

이부분에서 admin 으로 주문을 했던 자료는 출력을 제외 시키려고 합니다. 

 

and mb_id not = 'admin'" 식으로 추가 하려고 합니다.

 

 

아래는 출력하는 SELECT 입니다. 


    $sql = " SELECT a.od_id, od_b_zip1, od_b_zip2, od_b_addr1, od_b_addr2, od_b_addr3, od_b_addr_jibeon, od_b_name, od_b_tel, od_b_hp, b.it_name, ct_qty, b.it_id, a.od_id, od_memo, od_invoice, b.ct_option, b.ct_send_cost, b.it_sc_type
               FROM {$g5['g5_shop_order_table']} a, {$g5['g5_shop_cart_table']} b
              where a.od_id = b.od_id ";
    if ($case == 1) // 출력기간
        $sql .= " and a.od_time between '$fr_date 00:00:00' and '$to_date 23:59:59' ";
    else // 주문번호구간
        $sql .= " and a.od_id between '$fr_od_id' and '$to_od_id' ";
    if ($ct_status)
        $sql .= " and b.ct_status = '$ct_status' ";
    $sql .="  order by od_time asc, b.it_id, b.io_type, b.ct_id ";
    $result = sql_query($sql);

 

어디에 추가를 하여야 하나요 ? 항상 감사드립니다.

 

이 질문에 댓글 쓰기 :

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
  • 질문이 없습니다.
전체 0
© SIRSOFT
현재 페이지 제일 처음으로