미배송건 쿼리 보니 토나오네요.. 흑흑 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

미배송건 쿼리 보니 토나오네요.. 흑흑 정보

미배송건 쿼리 보니 토나오네요.. 흑흑

본문

count(distinct a.od_id) as ordercount,
    count(b.ct_id) as itemcount,
    (SUM(b.ct_amount * b.ct_qty) + a.od_send_cost) as orderamount ,
    (SUM(IF(b.ct_status = '취소' OR b.ct_status = '반품' OR b.ct_status = '품절', b.ct_amount * b.ct_qty, 0))) as ordercancel,
    (a.od_receipt_bank + a.od_receipt_card + a.od_receipt_hp + a.od_receipt_point) as receiptamount,
    (a.od_refund_amount + a.od_cancel_card) as receiptcancel,
    (
        (SUM(b.ct_amount * b.ct_qty) + a.od_send_cost) -
        (SUM(IF(b.ct_status = '취소' OR b.ct_status = '반품' OR b.ct_status = '품절', b.ct_amount * b.ct_qty, 0))) -
        a.od_dc_amount -
        (a.od_receipt_bank + a.od_receipt_card + a.od_receipt_hp + a.od_receipt_point) +
        (a.od_refund_amount + a.od_cancel_card)
    ) as misu ");

>>

미배송건 쿼리 보니 토나오네요.. 흑흑

취소한것도 미배송에 나오는데요 안나오게 할려면 어떻게 하면 좋을까요??

Fatal error: Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, null given in /home/kagla/new-sir/old/lib/common.lib.php:2339 Stack trace: #0 /home/kagla/new-sir/old/lib/common.lib.php(2339): mysqli_fetch_assoc() #1 /home/kagla/new-sir/old/skin/board/v16/view.skin.php(795): sql_fetch_array() #2 /home/kagla/new-sir/old/bbs/view.php(403): include_once('...') #3 /home/kagla/new-sir/old/bbs/board.php(300): include_once('...') #4 {main} thrown in /home/kagla/new-sir/old/lib/common.lib.php on line 2339