$g4[time_ymd] 를 세분화하게 설정 정보
$g4[time_ymd] 를 세분화하게 설정본문
게시물을 읽을때 포인트가 차감되는데
insert_point($member[mb_id], $board[bo_read_point], "$board[bo_subject] $wr_id 글읽기", $bo_table, $wr_id, $g4['time_ymd']);
$g4[time_ymd] 이걸 붙이니 날짜가 바뀌기까지 차감이 안됩니다.
날짜가 바뀌는거 말고 24시간이나 6시간으로 설정 할려면 어떻게 해야 하나요?
검색해보니 strtotime($g4['time_ymd']) + 24*60*60 이걸쓰면 되는데 어떻게 써야 하는지 ㅠㅜ
insert_point($member[mb_id], $board[bo_read_point], "$board[bo_subject] $wr_id 글읽기", $bo_table, $wr_id, $g4['time_ymd']);
$g4[time_ymd] 이걸 붙이니 날짜가 바뀌기까지 차감이 안됩니다.
날짜가 바뀌는거 말고 24시간이나 6시간으로 설정 할려면 어떻게 해야 하나요?
검색해보니 strtotime($g4['time_ymd']) + 24*60*60 이걸쓰면 되는데 어떻게 써야 하는지 ㅠㅜ
댓글 전체
$g4[time_ymdhis] 로 하면 됩니다
질문을 잘못 이해하고 답변을 드린 것 같아 다시 답변 드립니다
24 시간 적용
$next_time =24*60;
$row = sql_fetch(" select count(*) as cnt from $g4[point_table]
where mb_id = '$member[mb_id]' and po_rel_table = '$bo_table' and po_rel_id = '$wr_id' and DATE_ADD( po_datetime , interval $next_time HOUR_MINUTE) >= '$g4[time_ymdhis]' ");
if (!$row[cnt]) insert_point(...................., $g4[time_ymdhis] );
24 시간 적용
$next_time =24*60;
$row = sql_fetch(" select count(*) as cnt from $g4[point_table]
where mb_id = '$member[mb_id]' and po_rel_table = '$bo_table' and po_rel_id = '$wr_id' and DATE_ADD( po_datetime , interval $next_time HOUR_MINUTE) >= '$g4[time_ymdhis]' ");
if (!$row[cnt]) insert_point(...................., $g4[time_ymdhis] );