시간 당 추천 횟수 제한 .. 가능할까요 ? 정보
시간 당 추천 횟수 제한 .. 가능할까요 ?
본문
현재 배추스킨을 이용하고 있어 하루 제한량 설정이 가능한데
이것을 시간으로 쪼개면 가능할 것 같긴하지만.. 그걸 어떻게 해야할 지 도무지 감이잡히질 않아 이렇게 질문글 남깁니다.
배추스킨의 하루 추천 제한 소스부분 입니다.
if ($mw_basic[cf_good_count]) {
$sql = " select count(*) as cnt from $g4[board_good_table] where bo_table = '$bo_table' and mb_id = '$member[mb_id]' and bg_datetime like '$g4[time_ymd]%' ";
$tm1 = sql_fetch($sql);
$sql = " select count(*) as cnt from $mw[comment_good_table] where bo_table = '$bo_table' and mb_id = '$member[mb_id]' and bg_datetime like '$g4[time_ymd]%' ";
$tm2 = sql_fetch($sql);
if ($tm1[cnt]+$tm2[cnt] >= $mw_basic[cf_good_count])
die("추천/비추천은 하루에 $mw_basic[cf_good_count]번만 가능합니다.");
}
도대체 어떤 부분을 수정해야 시간 당 추천 제한이 가능할까요 ㅠㅠ!
이것을 시간으로 쪼개면 가능할 것 같긴하지만.. 그걸 어떻게 해야할 지 도무지 감이잡히질 않아 이렇게 질문글 남깁니다.
배추스킨의 하루 추천 제한 소스부분 입니다.
if ($mw_basic[cf_good_count]) {
$sql = " select count(*) as cnt from $g4[board_good_table] where bo_table = '$bo_table' and mb_id = '$member[mb_id]' and bg_datetime like '$g4[time_ymd]%' ";
$tm1 = sql_fetch($sql);
$sql = " select count(*) as cnt from $mw[comment_good_table] where bo_table = '$bo_table' and mb_id = '$member[mb_id]' and bg_datetime like '$g4[time_ymd]%' ";
$tm2 = sql_fetch($sql);
if ($tm1[cnt]+$tm2[cnt] >= $mw_basic[cf_good_count])
die("추천/비추천은 하루에 $mw_basic[cf_good_count]번만 가능합니다.");
}
도대체 어떤 부분을 수정해야 시간 당 추천 제한이 가능할까요 ㅠㅠ!
Fatal error: Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, null given in /home/kagla/new-sir/old/lib/common.lib.php:2339 Stack trace: #0 /home/kagla/new-sir/old/lib/common.lib.php(2339): mysqli_fetch_assoc() #1 /home/kagla/new-sir/old/skin/board/v16/view.skin.php(795): sql_fetch_array() #2 /home/kagla/new-sir/old/bbs/view.php(403): include_once('...') #3 /home/kagla/new-sir/old/bbs/board.php(300): include_once('...') #4 {main} thrown in /home/kagla/new-sir/old/lib/common.lib.php on line 2339