mysqli 지원 추가

This commit is contained in:
chicpro
2015-10-12 15:39:10 +09:00
parent 83e055791e
commit 804ae37f16
49 changed files with 76 additions and 78 deletions

View File

@ -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'])

View File

@ -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")
{

View File

@ -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'];
// 새창 띄우기인지

View File

@ -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";

View File

@ -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;

View File

@ -41,7 +41,7 @@ $result = sql_query($sql);
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++) {
for ($i=0; $row=sql_fetch_array($result); $i++) {
$href = "";
$sql = " select count(ev_id) as cnt from {$g5['g5_shop_event_item_table']} where ev_id = '{$row['ev_id']}' ";

View File

@ -78,7 +78,7 @@ if($ev_id) {
$event_option = "<option value=''>이벤트를 선택하세요</option>";
$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 .= '<option value="'.$row1['ev_id'].'" '.get_selected($ev_id, $row1['ev_id']).' >'.conv_subject($row1['ev_subject'], 20,"…").'</option>';
echo $event_option;
?>
@ -98,7 +98,7 @@ if($ev_id) {
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++)
for ($i=0; $row1=sql_fetch_array($result1); $i++)
{
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
@ -144,7 +144,7 @@ if($ev_id) {
</tr>
</thead>
<tbody>
<?php for ($i=0; $row=mysql_fetch_array($result); $i++) {
<?php for ($i=0; $row=sql_fetch_array($result); $i++) {
$href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
$sql = " select ev_id from {$g5['g5_shop_event_item_table']}

View File

@ -162,7 +162,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
$bg = 'bg'.($i%2);

View File

@ -11,7 +11,7 @@ if($it['it_id']) {
$sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '{$it['it_id']}' order by io_no asc ";
$result = sql_query($sql);
if(mysql_num_rows($result))
if(sql_num_rows($result))
$po_run = true;
} else if(!empty($_POST)) {
$opt1_subject = preg_replace('/[\'\"]/', '', trim(stripslashes($_POST['opt1_subject'])));

View File

@ -70,7 +70,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
@ -118,7 +118,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++) {
for ($i=0; $row=sql_fetch_array($result); $i++) {
$row['iq_subject'] = cut_str($row['iq_subject'], 30, "...");
$href = G5_SHOP_URL.'/item.php?it_id='.$row['it_id'];
$name = get_sideview($row['mb_id'], get_text($row['iq_name']), $row['mb_email'], $row['mb_homepage']);

View File

@ -40,7 +40,7 @@ if ($sel_ca_id)
$sql .= " group by a.it_id
order by $sort1 $sort2 ";
$result = sql_query($sql);
$total_count = mysql_num_rows($result);
$total_count = sql_num_rows($result);
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
@ -75,7 +75,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
@ -123,7 +123,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$href = G5_SHOP_URL."/item.php?it_id={$row['it_id']}";

View File

@ -70,7 +70,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
@ -128,7 +128,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$href = G5_SHOP_URL."/item.php?it_id={$row['it_id']}";

View File

@ -113,7 +113,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// 상품정보
$sql = " select it_name from {$g5['g5_shop_item_table']} where it_id = '{$row['it_id']}' ";

View File

@ -6,7 +6,7 @@ $ps_run = false;
if($it['it_id']) {
$sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '1' and it_id = '{$it['it_id']}' order by io_no asc ";
$result = sql_query($sql);
if(mysql_num_rows($result))
if(sql_num_rows($result))
$ps_run = true;
} else if(!empty($_POST)) {
$subject_count = count($_POST['subject']);

View File

@ -70,7 +70,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";

View File

@ -71,7 +71,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
@ -124,7 +124,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$href = G5_SHOP_URL."/item.php?it_id={$row['it_id']}";

View File

@ -12,7 +12,7 @@ $sql = " select *
order by od_id desc ";
$result = sql_query($sql);
if(!@mysql_num_rows($result))
if(!@sql_num_rows($result))
alert_close('배송처리할 주문 내역이 없습니다.');
/*================================================================================

View File

@ -157,7 +157,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
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);
// 합계금액 계산
$sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,

View File

@ -437,7 +437,7 @@ if(!sql_query(" select mb_id from {$g5['g5_shop_order_delete_table']} limit 1 ",
$tot_couponprice += $row['couponprice'];
$tot_misu += $row['od_misu'];
}
mysql_free_result($result);
sql_free_result($result);
if ($i == 0)
echo '<tr><td colspan="12" class="empty_table">자료가 없습니다.</td></tr>';
?>

View File

@ -22,7 +22,7 @@ if ($od_send_mail)
where od_id = '{$od['od_id']}'
order by ct_id ";
$result = sql_query($sql);
for ($j=0; $ct=mysql_fetch_array($result); $j++) {
for ($j=0; $ct=sql_fetch_array($result); $j++) {
$cart_list[$j]['it_id'] = $ct['it_id'];
$cart_list[$j]['it_name'] = $ct['it_name'];
$cart_list[$j]['it_opt'] = $ct['ct_option'];

View File

@ -50,7 +50,7 @@ if ($csv == 'csv')
$sql .= " and b.ct_status = '$ct_status' ";
$sql .=" order by od_time asc, b.it_id, b.io_type, b.ct_id ";
$result = sql_query($sql);
$cnt = @mysql_num_rows($result);
$cnt = @sql_num_rows($result);
if (!$cnt)
alert("출력할 내역이 없습니다.");
@ -65,7 +65,7 @@ if ($csv == 'csv')
echo iconv('utf-8', 'euc-kr', "우편번호,주소,이름,전화1,전화2,상품명,수량,선택사항,배송비,상품코드,주문번호,운송장번호,전하실말씀\n");
$save_it_id = '';
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$row = array_map('iconv_euckr', $row);
@ -145,7 +145,7 @@ if ($csv == 'xls')
$sql .= " and b.ct_status = '$ct_status' ";
$sql .=" order by od_time asc, b.it_id, b.io_type, b.ct_id ";
$result = sql_query($sql);
$cnt = @mysql_num_rows($result);
$cnt = @sql_num_rows($result);
if (!$cnt)
alert("출력할 내역이 없습니다.");
@ -264,7 +264,7 @@ if ($ct_status)
$sql .= " and b.ct_status = '$ct_status' ";
$sql .= " order by a.od_id ";
$result = sql_query($sql);
if (mysql_num_rows($result) == 0)
if (sql_num_rows($result) == 0)
{
echo "<script>alert('출력할 내역이 없습니다.'); window.close();</script>";
exit;

View File

@ -31,7 +31,7 @@ if ($sel_ca_id)
$sql .= " group by a.it_id, b.it_name
order by $sort1 $sort2 ";
$result = sql_query($sql);
$total_count = mysql_num_rows($result);
$total_count = sql_num_rows($result);
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
@ -63,7 +63,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
<?php
$sql1 = " select ca_id, ca_name from {$g5['g5_shop_category_table']} order by ca_order, ca_id ";
$result1 = sql_query($sql1);
for ($i=0; $row1=mysql_fetch_array($result1); $i++) {
for ($i=0; $row1=sql_fetch_array($result1); $i++) {
$len = strlen($row1['ca_id']) / 2 - 1;
$nbsp = "";
for ($i=0; $i<$len; $i++) $nbsp .= "&nbsp;&nbsp;&nbsp;";
@ -93,7 +93,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
</thead>
<tbody>
<?php
for ($i=0; $row=mysql_fetch_array($result); $i++)
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// $s_mod = icon("수정", "./itemqaform.php?w=u&amp;iq_id={$row['iq_id']}&amp;$qstr");
// $s_del = icon("삭제", "javascript:del('./itemqaupdate.php?w=d&amp;iq_id={$row['iq_id']}&amp;$qstr');");

View File

@ -259,7 +259,7 @@ class item_list
$sql = $this->query;
$result = sql_query($sql);
$this->total_count = @mysql_num_rows($result);
$this->total_count = @sql_num_rows($result);
} else {
@ -746,7 +746,7 @@ function display_type($type, $list_skin='', $list_mod='', $list_row='', $img_wid
$sql .= " order by it_order, it_id desc limit $items ";
$result = sql_query($sql);
/*
if (!mysql_num_rows($result)) {
if (!sql_num_rows($result)) {
return false;
}
*/
@ -781,7 +781,7 @@ function mobile_display_type($type, $skin_file, $list_row, $img_width, $img_heig
$sql .= " order by it_order, it_id desc limit $items ";
$result = sql_query($sql);
/*
if (!mysql_num_rows($result)) {
if (!sql_num_rows($result)) {
return false;
}
*/
@ -810,7 +810,7 @@ function display_category($no, $list_mod, $list_row, $img_width, $img_height, $c
$sql .= " and ca_id LIKE '{$ca_id}%' ";
$sql .= " order by it_order, it_id desc limit $items ";
$result = sql_query($sql);
if (!mysql_num_rows($result)) {
if (!sql_num_rows($result)) {
return false;
}
@ -938,7 +938,7 @@ function get_item_options($it_id, $subject)
$sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '0' and it_id = '$it_id' and io_use = '1' order by io_no asc ";
$result = sql_query($sql);
if(!mysql_num_rows($result))
if(!sql_num_rows($result))
return '';
$str = '';
@ -1026,7 +1026,7 @@ function get_item_supply($it_id, $subject)
$sql = " select * from {$g5['g5_shop_item_option_table']} where io_type = '1' and it_id = '$it_id' and io_use = '1' order by io_no asc ";
$result = sql_query($sql);
if(!mysql_num_rows($result))
if(!sql_num_rows($result))
return '';
$str = '';
@ -1169,7 +1169,7 @@ function display_event($no, $event, $list_mod, $list_row, $img_width, $img_heigh
if ($ca_id) $sql .= " and ca_id = '$ca_id' ";
$sql .= " order by b.it_order, a.it_id desc limit $items ";
$result = sql_query($sql);
if (!mysql_num_rows($result)) {
if (!sql_num_rows($result)) {
return false;
}

View File

@ -31,7 +31,7 @@ $sql .= " group by a.it_id ";
$sql .= " order by a.ct_id ";
$result = sql_query($sql);
$cart_count = mysql_num_rows($result);
$cart_count = sql_num_rows($result);
?>
<script src="<?php echo G5_JS_URL; ?>/shop.js"></script>

View File

@ -34,7 +34,7 @@ function get_mshop_category($ca_id, $len)
<a href="<?php echo $mshop_ca_href.$mshop_ca_row1['ca_id']; ?>"><?php echo get_text($mshop_ca_row1['ca_name']); ?></a>
<?php
$mshop_ca_res2 = sql_query(get_mshop_category($mshop_ca_row1['ca_id'], 4));
if(mysql_num_rows($mshop_ca_res2))
if(sql_num_rows($mshop_ca_res2))
echo '<button class="sub_ct_toggle ct_op">'.get_text($mshop_ca_row1['ca_name']).' 하위분류 열기</button>'.PHP_EOL;
for($j=0; $mshop_ca_row2=sql_fetch_array($mshop_ca_res2); $j++) {
@ -45,7 +45,7 @@ function get_mshop_category($ca_id, $len)
<a href="<?php echo $mshop_ca_href.$mshop_ca_row2['ca_id']; ?>">- <?php echo get_text($mshop_ca_row2['ca_name']); ?></a>
<?php
$mshop_ca_res3 = sql_query(get_mshop_category($mshop_ca_row2['ca_id'], 6));
if(mysql_num_rows($mshop_ca_res3))
if(sql_num_rows($mshop_ca_res3))
echo '<button type="button" class="sub_ct_toggle ct_op">'.get_text($mshop_ca_row2['ca_name']).' 하위분류 열기</button>'.PHP_EOL;
for($k=0; $mshop_ca_row3=sql_fetch_array($mshop_ca_res3); $k++) {
@ -56,7 +56,7 @@ function get_mshop_category($ca_id, $len)
<a href="<?php echo $mshop_ca_href.$mshop_ca_row3['ca_id']; ?>">- <?php echo get_text($mshop_ca_row3['ca_name']); ?></a>
<?php
$mshop_ca_res4 = sql_query(get_mshop_category($mshop_ca_row3['ca_id'], 8));
if(mysql_num_rows($mshop_ca_res4))
if(sql_num_rows($mshop_ca_res4))
echo '<button type="button" class="sub_ct_toggle ct_op">'.get_text($mshop_ca_row3['ca_name']).' 하위분류 열기</button>'.PHP_EOL;
for($m=0; $mshop_ca_row4=sql_fetch_array($mshop_ca_res4); $m++) {
@ -67,7 +67,7 @@ function get_mshop_category($ca_id, $len)
<a href="<?php echo $mshop_ca_href.$mshop_ca_row4['ca_id']; ?>">- <?php echo get_text($mshop_ca_row4['ca_name']); ?></a>
<?php
$mshop_ca_res5 = sql_query(get_mshop_category($mshop_ca_row4['ca_id'], 10));
if(mysql_num_rows($mshop_ca_res5))
if(sql_num_rows($mshop_ca_res5))
echo '<button type="button" class="sub_ct_toggle ct_op">'.get_text($mshop_ca_row4['ca_name']).' 하위분류 열기</button>'.PHP_EOL;
for($n=0; $mshop_ca_row5=sql_fetch_array($mshop_ca_res5); $n++) {

View File

@ -57,7 +57,7 @@ ob_start();
$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,

View File

@ -166,7 +166,7 @@ if(!$result) {
break;
}
die("<p>$sql<p>" . mysql_errno() . " : " . mysql_error() . "<p>error file : {$_SERVER['SCRIPT_NAME']}");
die("<p>$sql<p>" . sql_error_info() . "<p>error file : {$_SERVER['SCRIPT_NAME']}");
}
// 주문번호가 있으면 결제정보 반영
@ -204,7 +204,7 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
break;
}
die("<p>$sql<p>" . mysql_errno() . " : " . mysql_error() . "<p>error file : {$_SERVER['SCRIPT_NAME']}");
die("<p>$sql<p>" . sql_error_info() . "<p>error file : {$_SERVER['SCRIPT_NAME']}");
}
// 미수금 정보 업데이트

View File

@ -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' ";

View File

@ -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('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">', 0);
?>

View File

@ -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,

View File

@ -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');
?>

View File

@ -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';

View File

@ -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);
?>
<!-- 쿠폰 선택 시작 { -->

View File

@ -17,7 +17,7 @@ if($tno) {
}
$content .= '<p>오류내용</p>';
$content .= '<p>'.$sql.'</p><p>'.mysql_errno().' : '.mysql_error().'<p>error file : '.$_SERVER['SCRIPT_NAME'].'</p>';
$content .= '<p>'.$sql.'</p><p>'.sql_error_info().'<p>error file : '.$_SERVER['SCRIPT_NAME'].'</p>';
// 메일발송
mailer($od_name, $od_email, $config['cf_admin_email'], $subject, $content, 1);

View File

@ -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,

View File

@ -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,

View File

@ -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);
?>
<!-- 쿠폰 선택 시작 { -->

View File

@ -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);
?>
<!-- 쿠폰선택 시작 { -->

View File

@ -162,7 +162,7 @@ if(!$result) {
break;
}
die("<p>$sql<p>" . mysql_errno() . " : " . mysql_error() . "<p>error file : {$_SERVER['SCRIPT_NAME']}");
die("<p>$sql<p>" . sql_error_info() . "<p>error file : {$_SERVER['SCRIPT_NAME']}");
}
// 주문번호가 있으면 결제정보 반영
@ -200,7 +200,7 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
break;
}
die("<p>$sql<p>" . mysql_errno() . " : " . mysql_error() . "<p>error file : {$_SERVER['SCRIPT_NAME']}");
die("<p>$sql<p>" . sql_error_info() . "<p>error file : {$_SERVER['SCRIPT_NAME']}");
}
// 미수금 정보 업데이트

View File

@ -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'];

View File

@ -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'];

View File

@ -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'];

View File

@ -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'];

View File

@ -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'];

View File

@ -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' ";

View File

@ -20,7 +20,7 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">',
// 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);
?>
<li class="gnb_1dli" style="z-index:<?php echo $gnb_zindex; ?>">
<a href="<?php echo G5_SHOP_URL.'/list.php?ca_id='.$row['ca_id']; ?>" class="gnb_1da<?php if ($count) echo ' gnb_1dam'; ?>"><?php echo $row['ca_name']; ?></a>

View File

@ -34,7 +34,7 @@ function get_mshop_category($ca_id, $len)
<a href="<?php echo $mshop_ca_href.$mshop_ca_row1['ca_id']; ?>"><?php echo get_text($mshop_ca_row1['ca_name']); ?></a>
<?php
$mshop_ca_res2 = sql_query(get_mshop_category($mshop_ca_row1['ca_id'], 4));
if(mysql_num_rows($mshop_ca_res2))
if(sql_num_rows($mshop_ca_res2))
echo '<button class="sub_ct_toggle ct_op">'.get_text($mshop_ca_row1['ca_name']).' 하위분류 열기</button>'.PHP_EOL;
for($j=0; $mshop_ca_row2=sql_fetch_array($mshop_ca_res2); $j++) {
@ -45,7 +45,7 @@ function get_mshop_category($ca_id, $len)
<a href="<?php echo $mshop_ca_href.$mshop_ca_row2['ca_id']; ?>">- <?php echo get_text($mshop_ca_row2['ca_name']); ?></a>
<?php
$mshop_ca_res3 = sql_query(get_mshop_category($mshop_ca_row2['ca_id'], 6));
if(mysql_num_rows($mshop_ca_res3))
if(sql_num_rows($mshop_ca_res3))
echo '<button type="button" class="sub_ct_toggle ct_op">'.get_text($mshop_ca_row2['ca_name']).' 하위분류 열기</button>'.PHP_EOL;
for($k=0; $mshop_ca_row3=sql_fetch_array($mshop_ca_res3); $k++) {
@ -56,7 +56,7 @@ function get_mshop_category($ca_id, $len)
<a href="<?php echo $mshop_ca_href.$mshop_ca_row3['ca_id']; ?>">- <?php echo get_text($mshop_ca_row3['ca_name']); ?></a>
<?php
$mshop_ca_res4 = sql_query(get_mshop_category($mshop_ca_row3['ca_id'], 8));
if(mysql_num_rows($mshop_ca_res4))
if(sql_num_rows($mshop_ca_res4))
echo '<button type="button" class="sub_ct_toggle ct_op">'.get_text($mshop_ca_row3['ca_name']).' 하위분류 열기</button>'.PHP_EOL;
for($m=0; $mshop_ca_row4=sql_fetch_array($mshop_ca_res4); $m++) {
@ -67,7 +67,7 @@ function get_mshop_category($ca_id, $len)
<a href="<?php echo $mshop_ca_href.$mshop_ca_row4['ca_id']; ?>">- <?php echo get_text($mshop_ca_row4['ca_name']); ?></a>
<?php
$mshop_ca_res5 = sql_query(get_mshop_category($mshop_ca_row4['ca_id'], 10));
if(mysql_num_rows($mshop_ca_res5))
if(sql_num_rows($mshop_ca_res5))
echo '<button type="button" class="sub_ct_toggle ct_op">'.get_text($mshop_ca_row4['ca_name']).' 하위분류 열기</button>'.PHP_EOL;
for($n=0; $mshop_ca_row5=sql_fetch_array($mshop_ca_res5); $n++) {

View File

@ -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('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">', 0);
?>

View File

@ -20,7 +20,7 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_SKIN_URL.'/style.css">',
// 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);
?>
<li class="gnb_1dli" style="z-index:<?php echo $gnb_zindex; ?>">
<a href="<?php echo G5_SHOP_URL.'/list.php?ca_id='.$row['ca_id']; ?>" class="gnb_1da<?php if ($count) echo ' gnb_1dam'; ?>"><?php echo $row['ca_name']; ?></a>