최신글 질문 다시한번 드립니다. 정보
최신글 질문 다시한번 드립니다.본문
예 ) 공지사항 | 저작권 관련하여 알려드립니다.
굵은 글씨로 된 부분이 최신글인데 1줄만 나오게 하려고 합니다.
1) 최신글 1줄.
2) 링크 - 해당게시물로 이동.
최신글 스킨을 따로 쓰지 않고 나타내는 방법좀 알려주세요.
지난번에 가을하늘님께서 알려주신것에 링크 부분만 해결되면 될꺼 같은데... 워낙 아는게 없다보니 질문 드립니다.
<?
$bo_table = 'test'; //게시판 이름(테이블명)
$test = sql_fetch("select wr_subject from {$g4['write_prefix']}$bo_table where wr_is_comment=0 order by wr_datetime desc limit 1");
$test_subject = strip_tags($test['wr_subject']);
echo $test_subject ;
?>
댓글 전체
<?
$bo_table = 'test'; //게시판 이름(테이블명)
$test = sql_fetch("select wr_subject,wr_id from {$g4['write_prefix']}$bo_table where wr_is_comment=0 order by wr_datetime desc limit 1");
$test_subject = strip_tags($test['wr_subject']);
echo "<a href='{$g4[bbs_path]}/board.php?bo_table=$bo_table&wr_id={$test[wr_id]}'>$test_subject </a>";
?>
wr_subject 요넘이 제목이고
wr_id 요넘이 게시물 고유번호
$bo_table = 'test'; //게시판 이름(테이블명)
$test = sql_fetch("select wr_subject,wr_id from {$g4['write_prefix']}$bo_table where wr_is_comment=0 order by wr_datetime desc limit 1");
$test_subject = strip_tags($test['wr_subject']);
echo "<a href='{$g4[bbs_path]}/board.php?bo_table=$bo_table&wr_id={$test[wr_id]}'>$test_subject </a>";
?>
wr_subject 요넘이 제목이고
wr_id 요넘이 게시물 고유번호
와우~ 서누니 님 감사합니다. 덕분에 잘 해결했습니다.^^*