프리샵 추가

This commit is contained in:
gnuboard
2013-01-25 11:48:46 +09:00
parent 52da376f32
commit 26088ece3b
583 changed files with 44699 additions and 0 deletions

View File

@ -0,0 +1,36 @@
<?php
include_once('./_common.php');
// 선택/추가 옵션 테이블에서 상품정보가 없는 정보 삭제
$sql = " select distinct it_id
from {$g4['yc4_option_table']}
order by opt_id ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
// 상품정보 체크
$sql1 = " select it_id from {$g4['yc4_item_table']} where it_id = '{$row['it_id']}' ";
$row1 = sql_fetch($sql1);
if(!$row1['it_id']) {
@sql_query(" delete from {$g4['yc4_option_table']} where it_id = '{$row['it_id']}' ");
}
}
$sql = " select distinct it_id
from {$g4['yc4_supplement_table']}
order by sp_id ";
$result = sql_query($sql);
for($i=0; $row=sql_fetch_array($result); $i++) {
// 상품정보 체크
$sql1 = " select it_id from {$g4['yc4_item_table']} where it_id = '{$row['it_id']}' ";
$row1 = sql_fetch($sql1);
if(!$row1['it_id']) {
@sql_query(" delete from {$g4['yc4_supplement_table']} where it_id = '{$row['it_id']}' ");
}
}
?>