From e56f3ce1a13a7d15748209eed15a56d5ee951025 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 26 Aug 2013 09:33:50 +0900 Subject: [PATCH] =?UTF-8?q?ct=5Fnum=20=EA=B3=84=EC=82=B0=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/cartupdate.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/shop/cartupdate.php b/shop/cartupdate.php index bfc0132e0..059e2a05e 100644 --- a/shop/cartupdate.php +++ b/shop/cartupdate.php @@ -159,7 +159,17 @@ else // 장바구니에 담기 else $ct_select = 0; - $ct_num = 0; + // 장바구니에 Insert + $sql = " select max(ct_num) as max_ct_num + from {$g4['shop_cart_table']} + where it_id = '$it_id' + and od_id = '$tmp_cart_id' "; + $row = sql_fetch($sql); + if($row['max_ct_num'] > 0) + $ct_num = (int)$row['max_ct_num'] + 1; + else + $ct_num = 0; + $comma = ''; $sql = " INSERT INTO {$g4['shop_cart_table']} ( od_id, mb_id, it_id, it_name, ct_status, ct_price, ct_point, ct_point_use, ct_stock_use, ct_option, ct_qty, ct_num, ct_notax, io_id, io_type, io_price, ct_time, ct_ip, ct_send_cost, ct_direct, ct_select )