mysql.log 에서 쿼리가 한줄로 보여질수 있도록 쿼리문 수정

This commit is contained in:
gnuboard
2013-07-23 13:11:53 +09:00
parent 291f9d9b79
commit 318c868274
5 changed files with 17 additions and 60 deletions

View File

@ -8,13 +8,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<ul>
<?php
$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 )
where a.uq_id = '".get_session('ss_uq_id')."'
and a.ct_num = '0'
order by a.ct_id
";
$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 ) ";
$hsql .= " where a.uq_id = '".get_session('ss_uq_id')."' and a.ct_num = '0' order by a.ct_id ";
$hresult = sql_query($hsql);
for ($i=0; $row=sql_fetch_array($hresult); $i++)
{

View File

@ -8,12 +8,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<ul>
<?php
$hsql = "
select a.it_id, b.it_name from {$g4['shop_wish_table']} a, {$g4['shop_item_table']} b
where a.mb_id = '{$member['mb_id']}'
and a.it_id = b.it_id
order by a.wi_id desc
";
$hsql = " 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 ";
$hresult = sql_query($hsql);
for ($i=0; $row=sql_fetch_array($hresult); $i++)
{

View File

@ -3,10 +3,7 @@ include_once('./_common.php');
$it_id = $_POST['it_id'];
$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' ";
$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' ";
$it = sql_fetch($sql);
$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);
// 판매가격
$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' ";
$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' ";
$row2 = sql_fetch($sql2);
if(!mysql_num_rows($result))

View File

@ -34,9 +34,7 @@ if ($sort != "")
$sql_list1 = " select * ";
$sql_list2 = " order by $order_by it_order, it_id desc ";
$sql_common = " from {$g4['shop_item_table']}
where it_type{$type} = '1'
and it_use = '1' ";
$sql_common = " from {$g4['shop_item_table']} where it_type{$type} = '1' and it_use = '1' ";
if ($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 = "";
$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 ";
$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 ";
$result = sql_query($sql);
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]' ");