// 포인트 삭제
function delete_point($mb_id, $rel_table, $rel_id, $rel_action)
{
global $g4;
$result = false;
if ($rel_table || $rel_id || $rel_action)
{
//삭제 하기 전에 포인트 확인
$point = sql_query(" select po_point from $g4[point_table]
where mb_id = '$mb_id'
and po_rel_table = '$rel_table'
and po_rel_id = '$rel_id'
and po_rel_action = '$rel_action' ", false);
$result = sql_query(" delete from $g4[point_table]
where mb_id = '$mb_id'
and po_rel_table = '$rel_table'
and po_rel_id = '$rel_id'
and po_rel_action = '$rel_action' ", false);
// 포인트 내역의 합을 구하고
$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' ";
$result = sql_query($sql);
}
return $result;
}
//삭제 하기 전에 포인트 확인
이거 말인데요.. 포인트 확인을 왜 하는거죠? 아무리 봐도 알수가 없네요.. $point라는 함수가 쓰이질 않는데요..
function delete_point($mb_id, $rel_table, $rel_id, $rel_action)
{
global $g4;
$result = false;
if ($rel_table || $rel_id || $rel_action)
{
//삭제 하기 전에 포인트 확인
$point = sql_query(" select po_point from $g4[point_table]
where mb_id = '$mb_id'
and po_rel_table = '$rel_table'
and po_rel_id = '$rel_id'
and po_rel_action = '$rel_action' ", false);
$result = sql_query(" delete from $g4[point_table]
where mb_id = '$mb_id'
and po_rel_table = '$rel_table'
and po_rel_id = '$rel_id'
and po_rel_action = '$rel_action' ", false);
// 포인트 내역의 합을 구하고
$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' ";
$result = sql_query($sql);
}
return $result;
}
//삭제 하기 전에 포인트 확인
이거 말인데요.. 포인트 확인을 왜 하는거죠? 아무리 봐도 알수가 없네요.. $point라는 함수가 쓰이질 않는데요..
댓글 1개
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기