orderinquiryview.php 정렬을 최신 날짜순으로 정열 하려는데요... 채택완료
현재 소스 코드에 보면 정렬이.... 날짜순으로 안되어 있어서..... 마지막 주문한 것이 맨 마지막 페이지에 보이니까 불편 해서요... 소스 어디를 수정 해야 할지....
몰라서 올립니다..
<div id="sod_fin">
<div id="sod_fin_no">주문번호 <strong><?php echo $od_id; ?></strong></div>
<section class="sod_fin_list">
<h2>주문하신 상품</h2>
<?php
$st_count1 = $st_count2 = 0;
$custom_cancel = false;
$sql = " select it_id, it_name, cp_price, ct_send_cost, it_sc_type
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
group by it_id
order by ct_id ";
$result = sql_query($sql);
?>
<ul id="sod_list_inq" class="sod_list">
<?php
for($i=0; $row=sql_fetch_array($result); $i++) {
$image_width = 65;
$image_height = 65;
$image = get_it_image($row['it_id'], 65, 65, '', '', $row['it_name']);
// 옵션항목
$sql = " select ct_id, it_name, ct_option, ct_qty, ct_price, ct_point, ct_status, io_type, io_price
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id'
and it_id = '{$row['it_id']}'
order by io_type asc, ct_id asc ";
$res = sql_query($sql);
// 합계금액 계산
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,
SUM(ct_qty) as qty
from {$g5['g5_shop_cart_table']}
where it_id = '{$row['it_id']}'
and od_id = '$od_id' ";
$sum = sql_fetch($sql);
답변 3개
답변을 작성하려면 로그인이 필요합니다.
로그인