테스트 사이트 - 개발 중인 베타 버전입니다

최근 검색어 순위 기간 조정? 채택완료

둘째삼식 11년 전 조회 5,291

검색페이지에 최근 건색어 순위 스킨을 넣어서 사용중인데요.

약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개

채택된 답변
+20 포인트

​$date_gap_old = date("Y-m-d", strtotime($date_gap) - ($date_cnt * 86400));

이게 날짜 설정같습니다  

이부분을 수정하세요 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 2개

둘째삼식
11년 전
답변 감사합니다...
그런데, 저건 초수인가요? 일수?
불량학생
11년 전
일수입니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인