최근 검색어 순위 기간 조정? 채택완료
검색페이지에 최근 건색어 순위 스킨을 넣어서 사용중인데요.
약7일정도 지나면 검색어가 없어집니다. 즉 기간이 짧게 설정된것 같은데, 이걸 어디서 좀
출력되는 기간을 조정할수 없는지요...
아래는 관련 소스입니다.
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$date_gap_old = date("Y-m-d", strtotime($date_gap) - ($date_cnt * 86400));
$old = array(); $sql2 = " select pp_word, count(*) as cnt from $g4[popular_table] where pp_date between '$date_gap_old' and '$date_gap' group by pp_word order by cnt desc, pp_word limit 0, 100 "; $qry2 = sql_query($sql2); $count = mysql_num_rows($qry2); for ($j=0; $row2=sql_fetch_array($qry2); $j++) { $old[$j] = $row2; }
for ($i=0; $i<$pop_cnt; $i++) { for ($j=0; $j<$count; $j++) { if ($old[$j][pp_word] == $list[$i][pp_word]) { break; } }
$list[$i][pp_word] = urldecode($list[$i][pp_word]); $list[$i][pp_rank] = $i + 1; if ($count == $j) { $list[$i][old_pp_rank] = 0; $list[$i][rank_gap] = 0; } else { $list[$i][old_pp_rank] = $j + 1; $list[$i][rank_gap] = $list[$i][old_pp_rank] - $list[$i][pp_rank]; } if ($list[$i][rank_gap] > 0) $list[$i][icon] = "up"; else if ($list[$i][rank_gap] < 0) $list[$i][icon] = "down"; else if ($list[$i][old_pp_rank] == 0) $list[$i][icon] = "new"; else if ($list[$i][rank_gap] == 0) $list[$i][icon] = "nogap"; }
?>
|
|
답변 1개
답변을 작성하려면 로그인이 필요합니다.
로그인
그런데, 저건 초수인가요? 일수?