테스트 사이트 - 개발 중인 베타 버전입니다

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

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

오류 주소 : 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>
<!-- 상품검색 끝-->

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

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

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 1개

해결하였씁니다. ㅎㅎㅎ

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

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);

게시글 목록

번호 제목
284508
284499
284492
284490
284484
284481
284478
284476
284474
284472
284470
284458
284457
284454
284453
284447
284446
284444
284441
284440