1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<?php include_once('./_common.php');
$sql = "delete from {$g5['g5_shop_item_option_table']} where io_id = '' "; sql_query($sql);
$sql = "select it_id from {$g5['g5_shop_item_table']} where it_option_subject <> '' order by it_id"; $res = sql_query($sql); $cnt = 0; while($info=mysql_fetch_array($res)){ $sql = " INSERT INTO {$g5['g5_shop_item_option_table']} ( `io_id`, `io_type`, `it_id`, `io_price`, `io_buyprice`, `io_stock_qty`, `io_noti_qty`, `io_use`,io_qty_weight, io_cs_qty ) VALUES "; $sql .= " ( '', '0', '{$info['it_id']}', '0', '0', '0', '0', '1', '1', '0' )"; sql_query($sql); $cnt++; }
echo $cnt."개 상품 업데이트";
?>
|