From 067f2dacb029d36e2d1f7973aa6386ac04f4a608 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 26 Aug 2013 18:42:17 +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=9E=AC=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/cartupdate.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/shop/cartupdate.php b/shop/cartupdate.php index 059e2a05e..c352c5e21 100644 --- a/shop/cartupdate.php +++ b/shop/cartupdate.php @@ -160,13 +160,14 @@ else // 장바구니에 담기 $ct_select = 0; // 장바구니에 Insert - $sql = " select max(ct_num) as max_ct_num + $sql = " select ct_num from {$g4['shop_cart_table']} where it_id = '$it_id' - and od_id = '$tmp_cart_id' "; + and od_id = '$tmp_cart_id' + order by ct_num desc "; $row = sql_fetch($sql); - if($row['max_ct_num'] > 0) - $ct_num = (int)$row['max_ct_num'] + 1; + if($row['ct_num'] != '') + $ct_num = (int)$row['ct_num'] + 1; else $ct_num = 0;