상단 검색이 wr_6 필드의 검색이 안됩니다. > 그누4 질문답변

그누4 질문답변

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

상단 검색이 wr_6 필드의 검색이 안됩니다. 정보

상단 검색이 wr_6 필드의 검색이 안됩니다.

본문

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 : http://assawater.co.kr/

아래와 같은 소스중 ||wr_3||wr_6  이 부분을 추가 하여도 ||wr_3||wr_6 의 모델명으로 검색이 안되는군요.

부탁합니다. ^**^


<!-- 상단검색창 시작-->
    <form name=fmainsearch action="<?=$www?>/product.php">
    <input type="hidden" name="sfl" value="wr_subject||wr_3||wr_6">
    <input type="text" size="35" name="stx" style="border:5px solid #24b4e7; height:35px; font-size:15px; font-weight:bold; padding:5px; ime-mode:inactive;">
    <input type="submit" value="검색" class="search-button">
    </form>
    <!-- 상단검색창 끝 -->



board.php 로 연결이 안되는걸 보시니 혹 product.php 에

if ($stx)
{
    $sql_search = get_sql_search($sca, $sfl, $stx, $sop);
}
구문을 넣으셨나요

함수는
common.lib.php
get_sql_search($search_ca_name, $search_field, $search_text, $search_operator='and')
 부분을 확이해 보세요이 답변을 채택하기
답변





common.lib.php
get_sql_search($search_ca_name, $search_field, $search_text, $search_operator='and')


위 함수를 어떻게 고쳐야 하는가요??
도와 주세요.

균이2012.11.23 19:13:49115.♡.150.195

순전히 product.php 문제이니 이 화일을 보야야 알 수 있습니다
bo_table 값을 넘기지않아도 되도록 만든 것인지도...
리스트 스킨 하단의 검색폼도 참고하세요

=========================

product.php 파일입니다.

<?
include_once("./_common.php");
$www = $g4[path];
include_once("$www/head.php");

$charset = mb_detect_encoding($sca, "ASCII, UTF-8, EUC-KR");
if($charset=="UTF-8") $sca = iconv("UTF-8", "EUC-KR", $sca);

?>
<?
if(strpos($_SERVER["HTTP_HOST"], 'assawater') !== false || strpos($_SERVER["HTTP_HOST"], 'maru') !== false)  {
?>
<table width="703" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
<tr>
<td align="center" background="">

<?

if($sca=="정수기"){
include_once("$g4[path]/p1.php");
}
if($sca=="공기청정기"){
include_once("$g4[path]/p2.php");
}
if($sca=="비데"){
include_once("$g4[path]/p3.php");
}
if($sca=="연수기"){
include_once("$g4[path]/p4.php");
}
if($sca=="기타"){
include_once("$g4[path]/p5.php");
}
if($sca=="필터"){
include_once("$g4[path]/p6.php");
}
if($sca=="제습기"){
include_once("$g4[path]/p7.php");
}
if($sca=="팬히터"){
include_once("$g4[path]/p8.php");
}
if($sca=="부속"){
include_once("$g4[path]/p9.php");
}
if($sca=="#"){
include_once("$g4[path]/p10.php");
}
if($sca=="사은품"){
include_once("$g4[path]/p_event.php");
}
if($sca=="지도"){
include_once("$g4[path]/map.php");
}

if(!$sca){
include_once("$g4[path]/p1.php");
include_once("$g4[path]/p2.php");
include_once("$g4[path]/p3.php");
include_once("$g4[path]/p4.php");
include_once("$g4[path]/p5.php");
include_once("$g4[path]/p6.php");
include_once("$g4[path]/p7.php");
include_once("$g4[path]/p5.php");
include_once("$g4[path]/p8.php");
include_once("$g4[path]/p9.php");
include_once("$g4[path]/p10.php");
}
?>

<tr>
<td></td>
</tr>
</table>
<?}else{?>
<table width="980" border="0" cellspacing="0" cellpadding="0">

<tr>
<td align="center">
<?
if(strpos($_SERVER["HTTP_HOST"], 'chunghowater') !== false && $sca=="정수기")  {
?>
&nbsp;<a href="product.php?sca=정수기&wr_2=냉정수기"><font style="font-size:13pt;color:white;background-color:1A89CF"><b> 냉정수기 </b></font></a>&nbsp;
&nbsp;<a href="product.php?sca=정수기&wr_2=냉온정수기"><font style="font-size:13pt;color:white;background-color:1A89CF"><b> 냉온정수기 </b></font></a>&nbsp;
&nbsp;<a href="product.php?sca=정수기&wr_2=얼음정수기"><font style="font-size:13pt;color:white;background-color:1A89CF"><b> 얼음정수기 </b></font></a>
<?}?>

<?
if($sca=="정수기"){
include_once("$g4[path]/p1.php");
}

if($sca=="공기청정기"){
include_once("$g4[path]/p2.php");
}

if($sca=="비데"){
include_once("$g4[path]/p3.php");
}

if($sca=="연수기"){
include_once("$g4[path]/p4.php");

}
if($sca=="기타"){
include_once("$g4[path]/p5.php");

}
if($sca=="필터"){
include_once("$g4[path]/p6.php");

}
if($sca=="제습기"){
include_once("$g4[path]/p7.php");

}
if($sca=="팬히터"){
include_once("$g4[path]/p8.php");

}
if($sca=="부속"){
include_once("$g4[path]/p9.php");

}
if($sca=="#"){
include_once("$g4[path]/p10.php");

}
if($sca=="사은품"){
include_once("$g4[path]/p_event.php");
}

if(!$sca){

include_once("$g4[path]/p1.php");
include_once("$g4[path]/p2.php");
include_once("$g4[path]/p3.php");
include_once("$g4[path]/p4.php");
include_once("$g4[path]/p5.php");
include_once("$g4[path]/p6.php");
include_once("$g4[path]/p7.php");
include_once("$g4[path]/p8.php");
include_once("$g4[path]/p9.php");
include_once("$g4[path]/p10.php");
}
?>

<!----------------  F24 log code  ------------->
<script language='javascript' src='http://new.f24.co.kr/access/f24_log.js'></script>
<script language='javascript'>f24_go('jbj9256');</script>
<!----------------  F24 log code  ------------->

</table>
<?}?>

<?
include_once("$www/tail.php");
?>

====================================
<!-- 상품검색 시작-->
<table width="98%" cellspacing="0" cellpadding="0">
<form name=fsearch method=get style="margin:0px;">
<input type=hidden name=bo_table value="<?=$bo_table?>">
<input type=hidden name=sca      value="<?=$sca?>">
<input type=hidden name=sfl value="wr_subject||wr_content||wr_3||wr_6">
<input type=hidden name=sop value="or">
<tr height="25">
    <td width=50% class=l_10>
        상품검색 : <input name=stx style="ime-mode:inactive;" class=search_input maxlength=15 size=20 itemname="검색어" required value="<?=$stx?>">
        <input type=image src="<?=$board_skin_path?>/images/btn_search.gif" border=0 align=absmiddle>
&nbsp;
    </td>
    <td width=50% class=l_10>

&nbsp;
    </td>
</tr>
</form>
</table>
<!-- 상품검색 끝-->

위와 같이 고쳐 보았으나 상품 리스트 페이지에서는 검색이 되나 다른 페이지 에서는 검색이 안되는군요.

부족한 면이 많은 제게 힘을 주소서...

댓글 전체

해결하였씁니다. ㅎㅎㅎ

상품 리스트 페이지에 아래 부분중

if($wr_3) $sql_q3 = " and wr_6 = \"$wr_6\" ";
  or wr_6 like \"%$stx%\"
부분을 추가하니 해결이 되는군요.

그간 많은 관심과 조언을 주신 모든 분들께 감사를 드립니다.

$bo_table = "shop"; //

if($wr_2) $sql_q1 = " and wr_2 = \"$wr_2\" ";
if($wr_3) $sql_q2 = " and wr_3 = \"$wr_3\" ";
if($wr_3) $sql_q3 = " and wr_6 = \"$wr_6\" ";
if($stx) $sql_stx = " and (wr_subject like \"%$stx%\" or wr_3 like \"%$stx%\"  or wr_2 like \"%$stx%\"  or wr_6 like \"%$stx%\") ";


$sql = " select * from $g4[write_prefix]$bo_table where wr_buy_use = 1 and wr_is_comment = 0 and ca_name='$sca' $sql_q1 $sql_q2 $sql_q2 $sql_stx order by wr_count,wr_id desc limit 100 ";
    $result = sql_query($sql);
전체 9 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT