으

특정 조건에 맞는 최신글만 보이게 하려면..?

<input type=radio name="wr_1" value="고양이" <? if($write[wr_1] == "고양이") echo "checked"; ?> > 고양이
<input type=radio name="wr_1" value="멍멍이" <? if($write[wr_1] == "멍멍이") echo "checked"; ?> > 멍멍이

이런 식의 글을 작성 시..
최신 글(latest)에..
고양이로 작성된 글만 보이게 하려면 어떡해야하나요..?
|

댓글 2개

lib/latest.lib.php 를 여시면
중간쯤에
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_num limit 0, $rows ";
부분이 있습니다

if($bo_table=='해당게시판명')
{
$sql = " select * from $tmp_write_table where wr_is_comment = 0 and wr_1= '고양이' order by wr_num limit 0, $rows ";
}
else
{
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_num limit 0, $rows ";
}
으로 처리하시면 되실듯 합니다
다른 방법
lib/latest.lib.php
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_num limit 0, $rows "; ---> 수정 $options 추가
//수정 후
$sql = " select * from $tmp_write_table where wr_is_comment = 0 $options order by wr_num limit 0, $rows ";

최신글 출력시
<?=latest("basic", 'test', 10, 70, "'and wr_1='고양이'");
댓글을 작성하시려면 로그인이 필요합니다.

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

+
제목 글쓴이 날짜 조회
12-11-30 조회 848
12-11-30 조회 1,403
12-11-30 조회 940
12-11-30 조회 1,637
12-11-30 조회 1,863
12-11-30 조회 1,316
12-11-30 조회 930
12-11-30 조회 1,626
12-11-30 조회 2,891
12-11-30 조회 1,696
12-11-30 조회 1,181
12-11-30 조회 2,017
12-11-30 조회 1,694
12-11-30 조회 2,441
12-11-30 조회 1,539
12-11-30 조회 1,362
12-11-30 조회 937
12-11-30 조회 1,070
12-11-30 조회 1,086
12-11-30 조회 3,469