|
|
|
16년 전
|
조회 1,504
|
|
|
|
16년 전
|
조회 987
|
|
|
|
16년 전
|
조회 1,545
|
|
|
|
16년 전
|
조회 1,053
|
|
|
|
16년 전
|
조회 1,557
|
|
|
|
16년 전
|
조회 980
|
|
|
|
16년 전
|
조회 2,382
|
|
|
|
16년 전
|
조회 945
|
|
|
|
16년 전
|
조회 2,002
|
|
|
|
16년 전
|
조회 982
|
|
|
|
16년 전
|
조회 1,552
|
|
|
|
16년 전
|
조회 1,359
|
|
|
|
16년 전
|
조회 986
|
|
|
|
16년 전
|
조회 1,321
|
|
|
|
16년 전
|
조회 1,545
|
|
|
|
16년 전
|
조회 4,336
|
|
|
|
16년 전
|
조회 1,596
|
|
|
|
16년 전
|
조회 1,541
|
|
|
|
16년 전
|
조회 1,528
|
|
|
|
16년 전
|
조회 993
|
댓글 7개
// 포인트 내역의 합을 구하고
$sql = " select sum(po_point) as sum_po_point from $g4[point_table] where mb_id = '$mb_id' ";
$row = sql_fetch($sql);
$sum_point = $row[sum_po_point];
// 포인트 UPDATE
$sql = " update $g4[member_table] set mb_point = '$sum_point' where mb_id = '$mb_id' ";
sql_query($sql);
이렇게 되는 부분이 있는데요
if($sum_point >1000000) $sum_point = 1000000;
이렇게 해주면 포인트 내역이 계속 쌓여도 $g4[member_table]에는 계속 100만으로 찍히겠네요.
$sql = " select sum(po_point) as sum_po_point from $g4[point_table] where mb_id = '$mb_id' ";
$row = sql_fetch($sql);
$sum_point = $row[sum_po_point];
if($sum_point >100000) $sum_point = 100000;
// 포인트 UPDATE
$sql = " update $g4[member_table] set mb_point = '$sum_point' where mb_id = '$mb_id' ";
sql_query($sql);
안그러면 다른 아이디로 또 장난을 칩니다.