mysql.log 에서 쿼리가 한줄로 보여질수 있도록 쿼리문 수정
This commit is contained in:
@ -475,13 +475,9 @@ function display_type($type, $skin_file, $list_mod, $list_row, $img_width, $img_
|
|||||||
|
|
||||||
// 1.02.00
|
// 1.02.00
|
||||||
// it_order 추가
|
// it_order 추가
|
||||||
$sql = " select *
|
$sql = " select * from {$g4['shop_item_table']} where it_use = '1' and it_type{$type} = '1' ";
|
||||||
from {$g4['shop_item_table']}
|
|
||||||
where it_use = '1'
|
|
||||||
and it_type{$type} = '1' ";
|
|
||||||
if ($ca_id) $sql .= " and ca_id like '$ca_id%' ";
|
if ($ca_id) $sql .= " and ca_id like '$ca_id%' ";
|
||||||
$sql .= " order by it_order, it_id desc
|
$sql .= " order by it_order, it_id desc limit $items ";
|
||||||
limit $items ";
|
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
/*
|
/*
|
||||||
if (!mysql_num_rows($result)) {
|
if (!mysql_num_rows($result)) {
|
||||||
@ -508,13 +504,9 @@ function mobile_display_type($type, $skin_file, $list_row, $img_width, $img_heig
|
|||||||
|
|
||||||
// 1.02.00
|
// 1.02.00
|
||||||
// it_order 추가
|
// it_order 추가
|
||||||
$sql = " select *
|
$sql = " select * from {$g4['shop_item_table']} where it_use = '1' and it_type{$type} = '1' ";
|
||||||
from {$g4['shop_item_table']}
|
|
||||||
where it_use = '1'
|
|
||||||
and it_type{$type} = '1' ";
|
|
||||||
if ($ca_id) $sql .= " and ca_id like '$ca_id%' ";
|
if ($ca_id) $sql .= " and ca_id like '$ca_id%' ";
|
||||||
$sql .= " order by it_order, it_id desc
|
$sql .= " order by it_order, it_id desc limit $items ";
|
||||||
limit $items ";
|
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
/*
|
/*
|
||||||
if (!mysql_num_rows($result)) {
|
if (!mysql_num_rows($result)) {
|
||||||
@ -815,10 +807,7 @@ function print_item_options($it_id, $uq_id)
|
|||||||
{
|
{
|
||||||
global $g4;
|
global $g4;
|
||||||
|
|
||||||
$sql = " select ct_option, ct_qty
|
$sql = " select ct_option, ct_qty from {$g4['shop_cart_table']} where it_id = '$it_id' and uq_id = '$uq_id' order by io_type asc, ct_num asc, ct_id asc ";
|
||||||
from {$g4['shop_cart_table']}
|
|
||||||
where it_id = '$it_id' and uq_id = '$uq_id'
|
|
||||||
order by io_type asc, ct_num asc, ct_id asc ";
|
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
$str = '';
|
$str = '';
|
||||||
@ -898,15 +887,9 @@ function display_event($no, $event, $list_mod, $list_row, $img_width, $img_heigh
|
|||||||
|
|
||||||
// 1.02.00
|
// 1.02.00
|
||||||
// b.it_order 추가
|
// b.it_order 추가
|
||||||
$sql = " select b.*
|
$sql = " select b.* from {$g4['shop_event_item_table']} a, {$g4['shop_item_table']} b where a.it_id = b.it_id and b.it_use = '1' and a.ev_id = '$event' ";
|
||||||
from {$g4['shop_event_item_table']} a,
|
|
||||||
{$g4['shop_item_table']} b
|
|
||||||
where a.it_id = b.it_id
|
|
||||||
and b.it_use = '1'
|
|
||||||
and a.ev_id = '$event' ";
|
|
||||||
if ($ca_id) $sql .= " and ca_id = '$ca_id' ";
|
if ($ca_id) $sql .= " and ca_id = '$ca_id' ";
|
||||||
$sql .= " order by b.it_order, a.it_id desc
|
$sql .= " order by b.it_order, a.it_id desc limit $items ";
|
||||||
limit $items ";
|
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
if (!mysql_num_rows($result)) {
|
if (!mysql_num_rows($result)) {
|
||||||
return false;
|
return false;
|
||||||
@ -1100,11 +1083,7 @@ function display_relation_item($it_id, $width, $height, $rows=3)
|
|||||||
if(!$it_id)
|
if(!$it_id)
|
||||||
return $str;
|
return $str;
|
||||||
|
|
||||||
$sql = " select b.it_id, b.it_name, b.it_price, b.it_tel_inq, b.it_gallery
|
$sql = " select b.it_id, b.it_name, b.it_price, b.it_tel_inq, b.it_gallery from {$g4['shop_item_relation_table']} a left join {$g4['shop_item_table']} b on ( a.it_id2 = b.it_id ) where a.it_id = '$it_id' order by ir_no asc limit 0, $rows ";
|
||||||
from {$g4['shop_item_relation_table']} a left join {$g4['shop_item_table']} b on ( a.it_id2 = b.it_id )
|
|
||||||
where a.it_id = '$it_id'
|
|
||||||
order by ir_no asc
|
|
||||||
limit 0, $rows ";
|
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
@ -1213,10 +1192,7 @@ function insert_mileage($mb_id, $point, $content='', $od_id, $ct_id)
|
|||||||
|
|
||||||
// 이미 등록된 내역이라면 건너뜀
|
// 이미 등록된 내역이라면 건너뜀
|
||||||
if($od_id && $ct_id) {
|
if($od_id && $ct_id) {
|
||||||
$sql = " select count(*) as cnt from {$g4['shop_mileage_table']}
|
$sql = " select count(*) as cnt from {$g4['shop_mileage_table']} where mb_id = '$mb_id' and od_id = '$od_id' and ct_id = '$ct_id' ";
|
||||||
where mb_id = '$mb_id'
|
|
||||||
and od_id = '$od_id'
|
|
||||||
and ct_id = '$ct_id' ";
|
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
if ($row['cnt'])
|
if ($row['cnt'])
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@ -8,13 +8,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<?php
|
<?php
|
||||||
$hsql = "
|
$hsql = " select a.it_id, a.it_name, a.ct_qty from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id ) ";
|
||||||
select a.it_id, a.it_name, a.ct_qty
|
$hsql .= " where a.uq_id = '".get_session('ss_uq_id')."' and a.ct_num = '0' order by a.ct_id ";
|
||||||
from {$g4['shop_cart_table']} a left join {$g4['shop_item_table']} b on ( a.it_id = b.it_id )
|
|
||||||
where a.uq_id = '".get_session('ss_uq_id')."'
|
|
||||||
and a.ct_num = '0'
|
|
||||||
order by a.ct_id
|
|
||||||
";
|
|
||||||
$hresult = sql_query($hsql);
|
$hresult = sql_query($hsql);
|
||||||
for ($i=0; $row=sql_fetch_array($hresult); $i++)
|
for ($i=0; $row=sql_fetch_array($hresult); $i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -8,12 +8,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<?php
|
<?php
|
||||||
$hsql = "
|
$hsql = " select a.it_id, b.it_name from {$g4['shop_wish_table']} a, {$g4['shop_item_table']} b ";
|
||||||
select a.it_id, b.it_name from {$g4['shop_wish_table']} a, {$g4['shop_item_table']} b
|
$hsql .= " where a.mb_id = '{$member['mb_id']}' and a.it_id = b.it_id order by a.wi_id desc ";
|
||||||
where a.mb_id = '{$member['mb_id']}'
|
|
||||||
and a.it_id = b.it_id
|
|
||||||
order by a.wi_id desc
|
|
||||||
";
|
|
||||||
$hresult = sql_query($hsql);
|
$hresult = sql_query($hsql);
|
||||||
for ($i=0; $row=sql_fetch_array($hresult); $i++)
|
for ($i=0; $row=sql_fetch_array($hresult); $i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,10 +3,7 @@ include_once('./_common.php');
|
|||||||
|
|
||||||
$it_id = $_POST['it_id'];
|
$it_id = $_POST['it_id'];
|
||||||
|
|
||||||
$sql = " select it_id, it_option_subject, it_supply_subject, it_price, it_point, it_point_type
|
$sql = " select it_id, it_option_subject, it_supply_subject, it_price, it_point, it_point_type from {$g4['shop_item_table']} where it_id = '$it_id' and it_use = '1' ";
|
||||||
from {$g4['shop_item_table']}
|
|
||||||
where it_id = '$it_id'
|
|
||||||
and it_use = '1' ";
|
|
||||||
$it = sql_fetch($sql);
|
$it = sql_fetch($sql);
|
||||||
$it_point = get_item_point($it);
|
$it_point = get_item_point($it);
|
||||||
|
|
||||||
@ -19,8 +16,7 @@ $sql = " select * from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id
|
|||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
|
|
||||||
// 판매가격
|
// 판매가격
|
||||||
$sql2 = " select ct_price, it_name, ct_send_cost
|
$sql2 = " select ct_price, it_name, ct_send_cost from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id = '$it_id' and ct_num = '0' ";
|
||||||
from {$g4['shop_cart_table']} where uq_id = '$uq_id' and it_id = '$it_id' and ct_num = '0' ";
|
|
||||||
$row2 = sql_fetch($sql2);
|
$row2 = sql_fetch($sql2);
|
||||||
|
|
||||||
if(!mysql_num_rows($result))
|
if(!mysql_num_rows($result))
|
||||||
|
|||||||
@ -34,9 +34,7 @@ if ($sort != "")
|
|||||||
$sql_list1 = " select * ";
|
$sql_list1 = " select * ";
|
||||||
$sql_list2 = " order by $order_by it_order, it_id desc ";
|
$sql_list2 = " order by $order_by it_order, it_id desc ";
|
||||||
|
|
||||||
$sql_common = " from {$g4['shop_item_table']}
|
$sql_common = " from {$g4['shop_item_table']} where it_type{$type} = '1' and it_use = '1' ";
|
||||||
where it_type{$type} = '1'
|
|
||||||
and it_use = '1' ";
|
|
||||||
if ($ca_id) {
|
if ($ca_id) {
|
||||||
$sql_common .= " and ca_id = '$ca_id' ";
|
$sql_common .= " and ca_id = '$ca_id' ";
|
||||||
}
|
}
|
||||||
@ -84,11 +82,7 @@ echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_S
|
|||||||
// 분류를 링크하는 코드
|
// 분류를 링크하는 코드
|
||||||
/*
|
/*
|
||||||
$bar = "";
|
$bar = "";
|
||||||
$sql = " select ca_id from $g4[shop_item_table]
|
$sql = " select ca_id from $g4[shop_item_table] where it_type{$type} = '1' and it_use = '1' group by ca_id order by ca_id ";
|
||||||
where it_type{$type} = '1'
|
|
||||||
and it_use = '1'
|
|
||||||
group by ca_id
|
|
||||||
order by ca_id ";
|
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
for($i=0;$row=sql_fetch_array($result);$i++) {
|
for($i=0;$row=sql_fetch_array($result);$i++) {
|
||||||
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$row[ca_id]' ");
|
$row2 = sql_fetch(" select ca_name from $g4[shop_category_table] where ca_id = '$row[ca_id]' ");
|
||||||
|
|||||||
Reference in New Issue
Block a user