상단 검색이 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')


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

댓글 전체

일단 get_sql_search() 함수의 파라미터는 아래와 같습니다.

$sca = search category (카테고리명)
$sfl = search field (검색 필드)
$stx = search text (검색어)
$sop = search operator (검색 or, and 오퍼레이터)

위 4개의 변수가 어떻게 들어오는지 확인해보세요...
$sop 가 'and' 로 들어오는거 같은데..
board.php 로 연결이 안되는걸 보시니 혹 product.php 에

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

위 내용없어서 넣었습니다.

$sop 가 'and' 로 들어오는거 같은데 => 'or' 로 하여도 안되는 군요.

상품을 검색할 때 wr_subject 만 검색이 되고, ||wr_3||wr_6 <= 요 필드의 내용으로는 검색이 안된다는 것입니당... ㅠㅠㅠ
순전히 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");
?>
© SIRSOFT
현재 페이지 제일 처음으로