latest 함수 수정했는데 작동이 안되네요 ㅡㅡ;(급해서 ..죄송)

· 2010-03-29 (월) 15:35:33 · 1383

아래와 같이 쓰는데 무조건wr_num으로 뽑아오네요..그것도 게시물번호 1,2,3,4번만 ㅡㅡ;
뭐가문제죠. ,,

//  =latest_category("최신글스킨", "게시판이름", 게시물수, 제목글자수, "옵션", "카테고리이름", "뽑아오는종류결정");

function latest_category ($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="", $category="", $sunseo="wr_num")
{
    global $g4;

    if ($skin_dir)
        $latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
    else
        $latest_skin_path = "$g4[path]/skin/latest/basic";

    $list = array();

    $sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
    $board = sql_fetch($sql);

    $tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
    $sql = " select * from $tmp_write_table where wr_is_comment = 0 and ca_name = '$category' order by '$sunseo' limit 0, $rows ";

    // explain($sql);
    $result = sql_query($sql);
    for ($i=0; $row = sql_fetch_array($result); $i++)
        $list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
   
    ob_start();
    include "$latest_skin_path/latest.skin.php";
    $content = ob_get_contents();
    ob_end_clean();

    return $content;
}

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

자유게시판

202,947건
+
제목 글쓴이 날짜 조회
10-03-30 조회 1,944
10-03-30 조회 2,258
10-03-30 조회 1,479
10-03-30 조회 2,070
10-03-30 조회 3,187
10-03-29 조회 1,776
10-03-29 조회 2,158
10-03-29 조회 1,913
10-03-29 조회 1,736
10-03-29 조회 1,781
10-03-29 조회 1,805
10-03-29 조회 1,929
10-03-29 조회 1,788
10-03-29 조회 1,534
10-03-29 조회 2,068
10-03-29 조회 1,878
10-03-29 조회 1,932
10-03-29 조회 1,948
10-03-29 조회 1,384
10-03-29 조회 1,696