상품 한번만 구매가능하게 하기
본문
// 한번만 구매가능하도록
$sql = " select it_id from {$g5['g5_shop_cart_table']}
where mb_id = '{$member['mb_id']}'
and it_id = '$it_id'
and ct_status != '취소' and ct_status != '쇼핑'
";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
if (!$row['it_id']) {
alert('이미 지원한 캠페인입니다.');
}
}
/shop/orderformupdate.php 에 넣었는데 여러번 구매가 되네요 ㅠㅠ
소스가 잘못된걸까요?
!-->
답변을 작성하시기 전에 로그인 해주세요.