그누보드4 에있던 인기 검색어 기능.. > 자유게시판

자유게시판

그누보드4 에있던 인기 검색어 기능.. 정보

그누보드4 에있던 인기 검색어 기능..

본문

그 뭐였더라.. 클릭수에 따라 업 & 다운 뉴 nogap 이렇게 되는거 있죠 그거 소스 그누보드5 화해서 작업중인데..

 

참 아예 적용 시켜서 반응이 없내요... 참 ... ㅠ_ㅠ..이힝 ㅜ_ㅜ..

추천
0
  • 복사

댓글 10개

요거에요 ㅜ_ㅜ...


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

$old = array();
$sql2 = " select pp_word, count(*) as cnt from {$g5['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";
}
이게 그누보드4 에서 해석해보니깐 db 로 between 문으로 해당날자 사이에 예약어 같은걸이용해서 count(*) as cnt 문 즉 숫자 출력하는건데 인식이 안되는건지 제가 잘못한건지... 아예 작동을 안하고 NEW 만뜨더라구요 ㅎㅎ
© SIRSOFT
현재 페이지 제일 처음으로