'' group by a.it_id "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) { // 합계금액 계산 $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, SUM(ct_point * ct_qty) as point, SUM(ct_qty) as qty from {$g5['g5_shop_cart_table']} where it_id = '{$row['it_id']}' and od_id = '$od_id' and ct_select = '1' "; $sum = sql_fetch($sql); // 옵션정보 $sql2 = " select ct_option, ct_qty, io_price from {$g5['g5_shop_cart_table']} where it_id = '{$row['it_id']}' and od_id = '$od_id' and ct_select = '1' order by io_type asc, ct_id asc "; $result2 = sql_query($sql2); $options = ''; $options_ul = ' style="margin:0;padding:0"'; // ul style $options_li = ' style="padding:5px 0;list-style:none"'; // li style for($k=0; $row2=sql_fetch_array($result2); $k++) { if($k == 0) $options .= '