하루 1회만 글쓰기 가능하게 하기 채택완료
숀보영
10년 전
조회 2,389
$sql = " select count(*) as cnt from $write_table where mb_id = '$member[mb_id]' and wr_datetime like '".G5_TIME_YMD."%' ";
$row = sql_fetch($sql);
if ($row[cnt] > 0 & !$is_admin) {
alert("이미 오늘 글쓰기 가능횟수 1회를\\n모두 소진 하셨습니다.");
}
이렇게 되면 글쓰기 가능횟수가 자정에 초기화가 되는데
이것을 오전 9시로 변경하고 싶습니다... 어떻게 해야 할지 도통 감이 안잡히네요.
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
채택된 답변
+20 포인트
10년 전
</p><p>$tondate = date("Y-m-d").' 09:00:00';</p><p><span style="font-family: gulim, helvetica; font-size: 13.0799999237061px; line-height: 23.5440006256104px; background-color: rgb(255, 255, 255);">$sql = " select count(*) as cnt from $write_table where mb_id = '$member[mb_id]' and wr_datetime >'$tondate'";</span><span style="font-family: gulim, helvetica; font-size: 13.0799999237061px; line-height: 23.5440006256104px; background-color: rgb(255, 255, 255);"> </span><span style="font-size: 10pt; line-height: 1.5;"></span></p><p><span style="font-size: 10pt; line-height: 1.5;"> </span></p><p>
이러면 되지 않을까요?
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인