다중분류검색에대해서 물어보고싶어요... 채택완료
시ah
11년 전
조회 5,868
for ($j=0; $j
$this_style='';
if ($sca2==$cat1[$j]) $this_style=" thisTab";//여기서 $stx 에서 짤라낸 값을 가지고 판단
?>
}?>
for ($k=0; $k
$this_style='';
if ($sca3==$cat2[$k]) $this_style=" thisTab";
?>
}?>
현재는 값을 뽑아와요...
bbs/board.php?bo_table=0505&sca1=서울&sca2=가격&sca=민박
이런식으로 검색할려면 어떻케 해야되죠.. sca는 카테고리고
sca1=서울 &sca2=가격 머 이렇케 할려면
꼭 좀 부탁 드려여 ^^
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
11년 전
<span style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 20.399999618530273px; text-align: justify; background-color: #ecedef"></span></div><span style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 20.399999618530273px; text-align: justify; background-color: #ecedef">$dyn_where = " 1 = 1 "; </span><br style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 20.399999618530273px; text-align: justify; background-color: #ecedef" /><span style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 20.399999618530273px; text-align: justify; background-color: #ecedef">if($sca != "") $dyn_where .= " and sca = '$sca'"; </span><br style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 20.399999618530273px; text-align: justify; background-color: #ecedef" /><span style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 20.399999618530273px; text-align: justify; background-color: #ecedef">if(</span><span style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 20.399999618530273px; text-align: justify; background-color: #ecedef">$</span><span style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 20.399999618530273px; text-align: justify; background-color: #ecedef">sca1 != "") $dyn_where .= " and sca1 = '$sca1'"; </span><br style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 20.399999618530273px; text-align: justify; background-color: #ecedef" /><span style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 20.399999618530273px; text-align: justify; background-color: #ecedef">if(</span><span style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 20.399999618530273px; text-align: justify; background-color: #ecedef">$</span><span style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 20.399999618530273px; text-align: justify; background-color: #ecedef">sca2 != "") $dyn_where .= " and sca2 = '$sca2'"; </span><br style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 20.399999618530273px; text-align: justify; background-color: #ecedef" />
아래처럼요..
where $dyn_where
and조건이 아니면 or 로 하면 될것 같네요.
로그인 후 평가할 수 있습니다
답변에 대한 댓글 4개
�
시ah
11년 전
where 이하에??.. 이건 어디에 있어요?..... 어느폴더에 어디다 추가하는거죠??
�
주체크
11년 전
폴더가 아니고.. 해당 페이지 입니다.
bbs/board.php 의 상품 가져오는 조건에 추가하는 거에요~
bbs/board.php 의 상품 가져오는 조건에 추가하는 거에요~
�
시ah
11년 전
아 모르겟네요 ㅠㅠ 여기 다 그룹으로 되여있네요 ㅠㅠ 검색부분에서 추가하는거 아닌가요?..
아 ㅠㅠ머리 ㅠㅠ
아 ㅠㅠ머리 ㅠㅠ
�
주체크
11년 전
검색부분에서 추가하는거 입니다. ;;;
댓글을 작성하려면 로그인이 필요합니다.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인