답변 2개
/adm/shop_admin/itemexcelupdate.php
// it_id 중복체크
$sql2 = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$row2 = sql_fetch($sql2);
if($row2['cnt']) {
$fail_it_id[] = $it_id;
$dup_it_id[] = $it_id;
$dup_count++;
$fail_count++;
continue;
}
부분에 query 를 추가하세요
$sql2 = " select count(*) as cnt from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$row2 = sql_fetch($sql2);
if($row2['cnt']) {
/*추가*/
$sql = " UPDATE {$g5['g5_shop_item_table']} set
it_name = '$it_name',
it_price = '$it_price'
where it_id = '$it_id'";
sql_query($sql);
/*추가끝*/
$fail_it_id[] = $it_id;
$dup_it_id[] = $it_id;
$dup_count++;
$fail_count++;
continue;
}
답변을 작성하려면 로그인이 필요합니다.