답변 1개
채택된 답변
+20 포인트
답변에 대한 댓글 2개
11개월 전
11개월 전
$current_time = time();
$three_hours_ago = $current_time - (3 * 60 * 60); // 3시간 전 timestamp
$sql = "
SELECT COUNT(*) as cnt
FROM {$g5['point_table']}
WHERE po_rel_table = '@bok'
AND mb_id = '{$member['mb_id']}'
AND po_datetime >= FROM_UNIXTIME({$three_hours_ago})
";
$row = sql_fetch($sql);
$recent_cnt = $row['cnt'];
이렇게 해보세요
$three_hours_ago = $current_time - (3 * 60 * 60); // 3시간 전 timestamp
$sql = "
SELECT COUNT(*) as cnt
FROM {$g5['point_table']}
WHERE po_rel_table = '@bok'
AND mb_id = '{$member['mb_id']}'
AND po_datetime >= FROM_UNIXTIME({$three_hours_ago})
";
$row = sql_fetch($sql);
$recent_cnt = $row['cnt'];
이렇게 해보세요
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
$today = G5_TIME_YMD;
$sql = "
select count(*) as cnt
from {$g5['point_table']}
where po_rel_table = '@bok'
and mb_id = '{$member['mb_id']}'
and substring(po_datetime, 1, 10) = '{$today}'
";
$row = sql_fetch($sql);
$today_cnt = $row['cnt'];
글 수정이 안되네요