다시한번더 전체검색기능추가 질문입니다. 정보
그누보드 다시한번더 전체검색기능추가 질문입니다.본문
전체 검색기능에서 기능을 추가하려고합니다.
추가하려는 기능은
이름으로 검색하기가있잖아요. 이기능을 응용해서 이름으로 쓰여진 코멘트만을 검색하려합니다.
즉 홀길동이라는 사람이 작성한 코멘트만을 검색하려합니다. 새로운 글이나 답변쓴것은 말고 코멘트만요...
팁좀 부탁드립니다.
추가하려는 기능은
이름으로 검색하기가있잖아요. 이기능을 응용해서 이름으로 쓰여진 코멘트만을 검색하려합니다.
즉 홀길동이라는 사람이 작성한 코멘트만을 검색하려합니다. 새로운 글이나 답변쓴것은 말고 코멘트만요...
팁좀 부탁드립니다.
댓글 전체
급하신대로 전체검색에서 검색조건이 "이름"일때는 무조건 코멘트에서 찾도록 하실려면
bbs/gnusearch.php를 수정합니다.
수정전 :
$sql_search = " where (wr_datetime >= '$intime') " . $str;
if (!$srch_comment) {
$sql_search .= " and (wr_comment = '0') ";
}
$sql_search .= " and wr_secret = '0' ";
수정후 :
$sql_search = " where (wr_datetime >= '$intime') " . $str;
if (!$srch_comment) {
$sql_search .= " and (wr_comment = '0') ";
}
// 검색조건이 이름에서 찾기일때는 코멘트에서만 찾도록 수정
if($sselect == "wr_name"){
$sql_search .= " and (wr_comment != '0') ";
}
$sql_search .= " and wr_secret = '0' ";
bbs/gnusearch.php를 수정합니다.
수정전 :
$sql_search = " where (wr_datetime >= '$intime') " . $str;
if (!$srch_comment) {
$sql_search .= " and (wr_comment = '0') ";
}
$sql_search .= " and wr_secret = '0' ";
수정후 :
$sql_search = " where (wr_datetime >= '$intime') " . $str;
if (!$srch_comment) {
$sql_search .= " and (wr_comment = '0') ";
}
// 검색조건이 이름에서 찾기일때는 코멘트에서만 찾도록 수정
if($sselect == "wr_name"){
$sql_search .= " and (wr_comment != '0') ";
}
$sql_search .= " and wr_secret = '0' ";