도와주세요 ㅠㅠ 새글 올라오면 메뉴에도 뉴이미지 표시되도록 할려고 합니다. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

도와주세요 ㅠㅠ 새글 올라오면 메뉴에도 뉴이미지 표시되도록 할려고 합니다. 정보

도와주세요 ㅠㅠ 새글 올라오면 메뉴에도 뉴이미지 표시되도록 할려고 합니다.

본문

새글 올라오면 메뉴에도 뉴이미지 표시되도록 할려고 합니다.
<?
// 여기부터

//24시간 이내의 글 수 알아내기
$new_icon = "<img src='$g4[path]/img/icon_new.gif' align='absmiddle'>";  //이미지 파일 경로

function new_count($table_id){
    // 오늘을 불러옵니다.
    $intime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * 24));

    // 여기는 오늘과 글쓴 날짜를 비교합니다.
    $tmp_write_table .= "g4_write_$table_id";
    $sql2 = " select wr_datetime from $tmp_write_table where wr_datetime >= '$intime'";

    // 새로운 글이 몇개 있는지 확인합니다.
    $result2 = sql_query($sql2);

    $total_count = mysql_num_rows($result2);

    if ($total_count > 0) {
//        $str_cnt .= " [".$total_count."]";
        $str_cnt .= "".$total_count."";
        return $str_cnt;
    }
    else {
        $str_cnt .= "";
        return $str_cnt;
    }
}
// 여기까지
?>

 
위소스를 넣고
 
<? if (new_count(event) > 0) { echo "$new_icon"; }?>
 
위처럼 적용했습니다. 그런데 아래와 같은 문구가 나오네요..
어떻게 해야합니까 ?ㅠㅠ 도와주세요!!
 
 
select wr_datetime from g4_write_event where wr_datetime >= '2007-08-26 23:10:48'
1146 : Table 'padfaps.g4_write_event' doesn't exist
error file : /bbs/board.php
 
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로