주문내역에 상품코드번호 출력하는데 문장에 오류가있습니다.

주문내역에 상품코드번호 출력하는데 문장에 오류가있습니다.

QA

주문내역에 상품코드번호 출력하는데 문장에 오류가있습니다.

본문

주문내역에서 상품코드가 보였으면 합니다.

 

/adm/shop_admin/orderform.php

 

 

.......

<?php
        $chk_cnt = 0;
        for($i=0; $row=sql_fetch_array($result); $i++) {
            // 상품이미지
            $image = get_it_image($row['it_id'], 50, 50);
            $it_id_code = $row['it_id'];​​​​​​​​

            // 상품의 옵션정보
            $sql = " select ct_id, it_id, ct_price, ct_point, ct_qty, ct_option, ct_status, cp_price, ct_stock_use, ct_point_use, ct_send_cost, io_type, io_price
                        from {$g5['g5_shop_cart_table']}
                        where od_id = '{$od['od_id']}'
                          and it_id = '{$row['it_id']}'
                        order by io_type asc, ct_id asc ";
            $res = sql_query($sql);
            $rowspan = mysql_num_rows($res);

.........

 

 

 

 

 

..........

        <table>
        <caption>주문결제 내역</caption>
        <thead>
        <tr>
            <th scope="col">주문번호</th>
            <th scope="col">상품코드</th>
            <th scope="col">결제방법</th>
            <th scope="col">주문총액</th>
            <th scope="col">배송비</th>
            <th scope="col">포인트결제</th>
            <th scope="col">총결제액</th>
            <th scope="col">쿠폰</th>
            <th scope="col">주문취소</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td align="center"><?php echo $od['od_id']; ?></td>
            <td align="center"><?php echo $it_id_code; ?></td>
            <td class="td_paybybig"><?php echo $s_receipt_way; ?></td>
            <td class="td_numbig td_numsum"><?php echo display_price($amount['order']); ?></td>
            <td class="td_numbig"><?php echo display_price($od['od_send_cost'] + $od['od_send_cost2']); ?></td>
            <td class="td_numbig"><?php echo display_point($od['od_receipt_point']); ?></td>
            <td class="td_numbig td_numincome"><?php echo number_format($amount['receipt']); ?>원</td>
            <td class="td_numbig td_numcoupon"><?php echo display_price($amount['coupon']); ?></td>
            <td class="td_numbig td_numcancel"><?php echo number_format($amount['cancel']); ?>원</td>
        </tr>
        </tbody>
        </table>​

................

 

이렇케 바꿨는데  $it_id_code = $row['it_id'];​​​​​​​​ 이부분 추가한부분에서 구문 오류가 납니다.

어떻게 처리를 해야하는지 답변 부탁드리겠습니다.  

이 질문에 댓글 쓰기 :

답변 3

해당 부분 삭제 후

 

<?php echo $row['it_id']; ?>


로 바꿔보심이 어떨까요?


 

불러오는 쿼리에서  select 와 from 사이에 it_id 이 값이 있나요?

저 값이 없어서 불러올때 에러를 나타내는거 같은데요?

문의 주신 내용의 위에 부분 쿼리 $sql=  으로 시작되는 부분의 내용을 줘 보시겠어요?
제가 보기에는 그 부분에서 필드값이 없어서 그런거 같습니다.

답변을 작성하시기 전에 로그인 해주세요.
전체 12
QA 내용 검색

회원로그인

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