diff --git a/adm/shop_admin/ajax.orderitem.php b/adm/shop_admin/ajax.orderitem.php index 6f60f6b9d..7fe63b358 100644 --- a/adm/shop_admin/ajax.orderitem.php +++ b/adm/shop_admin/ajax.orderitem.php @@ -58,7 +58,7 @@ $result = sql_query($sql); and it_id = '{$row['it_id']}' order by io_type asc, ct_id asc "; $res = sql_query($sql); - $rowspan = mysql_num_rows($res); + $rowspan = sql_num_rows($res); // 배송비 switch($row['ct_send_cost']) diff --git a/adm/shop_admin/bannerformupdate.php b/adm/shop_admin/bannerformupdate.php index eeb7a7d27..e6e39ed87 100644 --- a/adm/shop_admin/bannerformupdate.php +++ b/adm/shop_admin/bannerformupdate.php @@ -37,7 +37,7 @@ if ($w=="") bn_order = '$bn_order' "; sql_query($sql); - $bn_id = mysql_insert_id(); + $bn_id = sql_insert_id(); } else if ($w=="u") { diff --git a/adm/shop_admin/bannerlist.php b/adm/shop_admin/bannerlist.php index d8f387323..9612b8b2b 100644 --- a/adm/shop_admin/bannerlist.php +++ b/adm/shop_admin/bannerlist.php @@ -52,7 +52,7 @@ $from_record = ($page - 1) * $rows; // 시작 열을 구함 order by bn_order, bn_id desc limit $from_record, $rows "; $result = sql_query($sql); - for ($i=0; $row=mysql_fetch_array($result); $i++) { + for ($i=0; $row=sql_fetch_array($result); $i++) { // 테두리 있는지 $bn_border = $row['bn_border']; // 새창 띄우기인지 diff --git a/adm/shop_admin/categoryformupdate.php b/adm/shop_admin/categoryformupdate.php index e0a2a7eba..989a1da0b 100644 --- a/adm/shop_admin/categoryformupdate.php +++ b/adm/shop_admin/categoryformupdate.php @@ -131,7 +131,7 @@ else if ($w == "d") $sql = " select it_id from {$g5['g5_shop_item_table']} where ca_id = '$ca_id' "; $result = sql_query($sql); $i=0; - while ($row = mysql_fetch_array($result)) + while ($row = sql_fetch_array($result)) { $i++; if ($i % 10 == 0) $str .= "\\n"; diff --git a/adm/shop_admin/itemcopyupdate.php b/adm/shop_admin/itemcopyupdate.php index 54b409db4..703b5cada 100644 --- a/adm/shop_admin/itemcopyupdate.php +++ b/adm/shop_admin/itemcopyupdate.php @@ -24,10 +24,8 @@ $cp = sql_fetch($sql); // 상품테이블의 필드가 추가되어도 수정하지 않도록 필드명을 추출하여 insert 퀴리를 생성한다. (상품코드만 새로운것으로 대체) $sql_common = ""; -$fields = mysql_list_fields(G5_MYSQL_DB, $g5['g5_shop_item_table']); -$columns = mysql_num_fields($fields); -for ($i = 0; $i < $columns; $i++) { - $fld = mysql_field_name($fields, $i); +$fields = sql_field_names($g5['g5_shop_item_table']); +foreach($fields as $fld) { if ($fld == 'it_id' || $fld == 'it_sum_qty' || $fld == 'it_use_cnt' || $fld == 'it_use_avg') continue; diff --git a/adm/shop_admin/itemevent.php b/adm/shop_admin/itemevent.php index c99a23cee..6d6d931c1 100644 --- a/adm/shop_admin/itemevent.php +++ b/adm/shop_admin/itemevent.php @@ -41,7 +41,7 @@ $result = sql_query($sql);
이벤트를 선택하세요"; $sql1 = " select ev_id, ev_subject from {$g5['g5_shop_event_table']} order by ev_id desc "; $result1 = sql_query($sql1); - while ($row1=mysql_fetch_array($result1)) + while ($row1=sql_fetch_array($result1)) $event_option .= ''; echo $event_option; ?> @@ -98,7 +98,7 @@ if($ev_id) { - 전체목 전체목 전체목 전체목 전체목 전체목 전체목 전체목 전체목 전체목 전체목$sql
" . mysql_errno() . " : " . mysql_error() . "
error file : {$_SERVER['SCRIPT_NAME']}"); + die("
$sql
" . sql_error_info() . "
error file : {$_SERVER['SCRIPT_NAME']}"); } // 주문번호가 있으면 결제정보 반영 @@ -204,7 +204,7 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) { break; } - die("
$sql
" . mysql_errno() . " : " . mysql_error() . "
error file : {$_SERVER['SCRIPT_NAME']}"); + die("
$sql
" . sql_error_info() . "
error file : {$_SERVER['SCRIPT_NAME']}"); } // 미수금 정보 업데이트 diff --git a/mobile/shop/wishlist.php b/mobile/shop/wishlist.php index b903bbcce..ffa483745 100644 --- a/mobile/shop/wishlist.php +++ b/mobile/shop/wishlist.php @@ -28,7 +28,7 @@ include_once(G5_MSHOP_PATH.'/_head.php'); where a.mb_id = '{$member['mb_id']}' order by a.wi_id desc "; $result = sql_query($sql); - for ($i=0; $row = mysql_fetch_array($result); $i++) { + for ($i=0; $row = sql_fetch_array($result); $i++) { $out_cd = ''; $sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' "; diff --git a/mobile/skin/shop/basic/main.event.skin.php b/mobile/skin/shop/basic/main.event.skin.php index 0c7a478ab..31e821811 100644 --- a/mobile/skin/shop/basic/main.event.skin.php +++ b/mobile/skin/shop/basic/main.event.skin.php @@ -5,7 +5,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 $hsql = " select ev_id, ev_subject, ev_subject_strong from {$g5['g5_shop_event_table']} where ev_use = '1' order by ev_id desc "; $hresult = sql_query($hsql); -if(mysql_num_rows($hresult)) { +if(sql_num_rows($hresult)) { // add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨 add_stylesheet('', 0); ?> diff --git a/shop/cart.php b/shop/cart.php index 807a61df4..0070cb1e1 100644 --- a/shop/cart.php +++ b/shop/cart.php @@ -82,7 +82,7 @@ include_once('./_head.php'); $it_send_cost = 0; - for ($i=0; $row=mysql_fetch_array($result); $i++) + 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, diff --git a/shop/cartoption.php b/shop/cartoption.php index 599850bc6..a0a37e7eb 100644 --- a/shop/cartoption.php +++ b/shop/cartoption.php @@ -19,7 +19,7 @@ $result = sql_query($sql); $sql2 = " select ct_price, it_name, ct_send_cost from {$g5['g5_shop_cart_table']} where od_id = '$cart_id' and it_id = '$it_id' order by ct_id asc limit 1 "; $row2 = sql_fetch($sql2); -if(!mysql_num_rows($result)) +if(!sql_num_rows($result)) die('no-cart'); ?> diff --git a/shop/orderaddress.php b/shop/orderaddress.php index ea8425f59..485bef220 100644 --- a/shop/orderaddress.php +++ b/shop/orderaddress.php @@ -28,7 +28,7 @@ $sql = " select * $result = sql_query($sql); -if(!mysql_num_rows($result)) +if(!sql_num_rows($result)) alert_close('배송지 목록 자료가 없습니다.'); $order_action_url = G5_HTTPS_SHOP_URL.'/orderaddressupdate.php'; diff --git a/shop/ordercoupon.php b/shop/ordercoupon.php index df5eba08f..c85acda20 100644 --- a/shop/ordercoupon.php +++ b/shop/ordercoupon.php @@ -18,7 +18,7 @@ $sql = " select * and cp_end >= '".G5_TIME_YMD."' and cp_minimum <= '$price' "; $result = sql_query($sql); -$count = mysql_num_rows($result); +$count = sql_num_rows($result); ?> diff --git a/shop/ordererrormail.php b/shop/ordererrormail.php index 7f95a8d37..eca98869c 100644 --- a/shop/ordererrormail.php +++ b/shop/ordererrormail.php @@ -17,7 +17,7 @@ if($tno) { } $content .= '
오류내용
'; -$content .= ''.$sql.'
'.mysql_errno().' : '.mysql_error().'
error file : '.$_SERVER['SCRIPT_NAME'].'
'; +$content .= ''.$sql.'
'.sql_error_info().'
error file : '.$_SERVER['SCRIPT_NAME'].'
'; // 메일발송 mailer($od_name, $od_email, $config['cf_admin_email'], $subject, $content, 1); diff --git a/shop/orderform.sub.php b/shop/orderform.sub.php index e835bd19b..eb8bd9576 100644 --- a/shop/orderform.sub.php +++ b/shop/orderform.sub.php @@ -69,7 +69,7 @@ if($is_kakaopay_use) { $comm_free_mny = 0; // 면세금액 $tot_tax_mny = 0; - for ($i=0; $row=mysql_fetch_array($result); $i++) + 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, diff --git a/shop/orderinquiryview.php b/shop/orderinquiryview.php index b8a5634d8..ad93d14c4 100644 --- a/shop/orderinquiryview.php +++ b/shop/orderinquiryview.php @@ -96,7 +96,7 @@ if($od['od_pg'] == 'lg') { and it_id = '{$row['it_id']}' order by io_type asc, ct_id asc "; $res = sql_query($sql); - $rowspan = mysql_num_rows($res) + 1; + $rowspan = sql_num_rows($res) + 1; // 합계금액 계산 $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price, diff --git a/shop/orderitemcoupon.php b/shop/orderitemcoupon.php index 7bf6ab17b..099de59d0 100644 --- a/shop/orderitemcoupon.php +++ b/shop/orderitemcoupon.php @@ -36,7 +36,7 @@ $sql = " select * ( cp_method = '1' and ( cp_target IN ( '{$it['ca_id']}', '{$it['ca_id2']}', '{$it['ca_id3']}' ) ) ) ) "; $result = sql_query($sql); -$count = mysql_num_rows($result); +$count = sql_num_rows($result); ?> diff --git a/shop/ordersendcostcoupon.php b/shop/ordersendcostcoupon.php index a12edafa7..4d4a2c14f 100644 --- a/shop/ordersendcostcoupon.php +++ b/shop/ordersendcostcoupon.php @@ -16,7 +16,7 @@ $sql = " select * and cp_end >= '".G5_TIME_YMD."' and cp_minimum <= '$price' "; $result = sql_query($sql); -$count = mysql_num_rows($result); +$count = sql_num_rows($result); ?> diff --git a/shop/personalpayformupdate.php b/shop/personalpayformupdate.php index 556782289..b53d6f54b 100644 --- a/shop/personalpayformupdate.php +++ b/shop/personalpayformupdate.php @@ -162,7 +162,7 @@ if(!$result) { break; } - die("$sql
" . mysql_errno() . " : " . mysql_error() . "
error file : {$_SERVER['SCRIPT_NAME']}"); + die("
$sql
" . sql_error_info() . "
error file : {$_SERVER['SCRIPT_NAME']}"); } // 주문번호가 있으면 결제정보 반영 @@ -200,7 +200,7 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) { break; } - die("
$sql
" . mysql_errno() . " : " . mysql_error() . "
error file : {$_SERVER['SCRIPT_NAME']}"); + die("
$sql
" . sql_error_info() . "
error file : {$_SERVER['SCRIPT_NAME']}"); } // 미수금 정보 업데이트 diff --git a/shop/price2/daum.php b/shop/price2/daum.php index 1009bcb95..ff9ff3bcf 100644 --- a/shop/price2/daum.php +++ b/shop/price2/daum.php @@ -107,7 +107,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) // 상품별옵션 $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; $result2 = sql_query($sql); - $opt_count = @mysql_num_rows($result2); + $opt_count = @sql_num_rows($result2); if(!$opt_count) { $it_name = $row['it_name']; diff --git a/shop/price2/naver.php b/shop/price2/naver.php index 3491a41b4..af6db7a5e 100644 --- a/shop/price2/naver.php +++ b/shop/price2/naver.php @@ -79,7 +79,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) // 상품별옵션 $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; $result2 = sql_query($sql); - $opt_count = @mysql_num_rows($result2); + $opt_count = @sql_num_rows($result2); if(!$opt_count) { $it_name = $row['it_name']; diff --git a/shop/price2/naver_new.php b/shop/price2/naver_new.php index eaf443442..78215531b 100644 --- a/shop/price2/naver_new.php +++ b/shop/price2/naver_new.php @@ -80,7 +80,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) // 상품별옵션 $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; $result2 = sql_query($sql); - $opt_count = @mysql_num_rows($result2); + $opt_count = @sql_num_rows($result2); if(!$opt_count) { $it_name = $row['it_name']; diff --git a/shop/price2/naver_new_summary.php b/shop/price2/naver_new_summary.php index d4e0b1257..5562d4c7a 100644 --- a/shop/price2/naver_new_summary.php +++ b/shop/price2/naver_new_summary.php @@ -30,7 +30,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) // 상품별옵션 $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; $result2 = sql_query($sql); - $opt_count = @mysql_num_rows($result2); + $opt_count = @sql_num_rows($result2); if(!$opt_count) { $it_name = $row['it_name']; diff --git a/shop/price2/naver_summary.php b/shop/price2/naver_summary.php index ded9fc60a..5886ec34f 100644 --- a/shop/price2/naver_summary.php +++ b/shop/price2/naver_summary.php @@ -27,7 +27,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) // 상품별옵션 $sql = " select * from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc "; $result2 = sql_query($sql); - $opt_count = @mysql_num_rows($result2); + $opt_count = @sql_num_rows($result2); if(!$opt_count) { $it_name = $row['it_name']; diff --git a/shop/wishlist.php b/shop/wishlist.php index 6b81f656d..a30e53c34 100644 --- a/shop/wishlist.php +++ b/shop/wishlist.php @@ -47,7 +47,7 @@ include_once('./_head.php'); $sql = " select a.wi_id, a.wi_time, b.* from {$g5['g5_shop_wish_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id ) "; $sql .= " where a.mb_id = '{$member['mb_id']}' order by a.wi_id desc "; $result = sql_query($sql); - for ($i=0; $row = mysql_fetch_array($result); $i++) { + for ($i=0; $row = sql_fetch_array($result); $i++) { $out_cd = ''; $sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' "; diff --git a/skin/shop/basic/boxcategory.skin.php b/skin/shop/basic/boxcategory.skin.php index 78511a122..7e9ffb12f 100644 --- a/skin/shop/basic/boxcategory.skin.php +++ b/skin/shop/basic/boxcategory.skin.php @@ -20,7 +20,7 @@ add_stylesheet('', // 2단계 분류 판매 가능한 것만 $sql2 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} where LENGTH(ca_id) = '4' and SUBSTRING(ca_id,1,2) = '{$row['ca_id']}' and ca_use = '1' order by ca_order, ca_id "; $result2 = sql_query($sql2); - $count = mysql_num_rows($result2); + $count = sql_num_rows($result2); ?>