특정 조건에 맞는 최신글만 보이게 하려면..? 정보
특정 조건에 맞는 최신글만 보이게 하려면..?
본문
<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)에..
고양이로 작성된 글만 보이게 하려면 어떡해야하나요..?
<input type=radio name="wr_1" value="멍멍이" <? if($write[wr_1] == "멍멍이") echo "checked"; ?> > 멍멍이
이런 식의 글을 작성 시..
최신 글(latest)에..
고양이로 작성된 글만 보이게 하려면 어떡해야하나요..?
댓글 전체
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 ";
}
으로 처리하시면 되실듯 합니다
중간쯤에
$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='고양이'");
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='고양이'");