1개의 특정 그룹만 검색
본문
아래 소스에서 hnbuilder 그룹만 검색되게 하려면
소스를 어떻게 수정해야 할까요?
-------------------------------------------------------------------------------
$sql = " select gr_id, bo_table, bo_read_level from $g4[board_table] where bo_use_search = '1' and bo_list_level <= '$member[mb_level]' ";
// and bo_read_level <= '$member[mb_level]' ";
$sql .= " and gr_id not in ( 'hnbuilder' , 'senior_s' , 'daily' , 'realty' , 'best' , 'baedalbu' , 'massage' , 'hairjob' , 'gangsa' , 'mihwa' , 'sikdang' , 'car' , 'welding' , 'nightwork' , 'maknodong' , 'drugstore' , 'parking' , 'cafe' ) ";
if ($gr_id)
$sql .= " and gr_id = '$gr_id' ";
if ($onetable) // 하나의 게시판만 검색한다면
$sql .= " and bo_table = '$onetable' ";
$sql .= " order by bo_order_search, gr_id, bo_table ";
$result = sql_query($sql);
답변 1
수정 전:
$sql .= " and gr_id not in ( 'hnbuilder' , 'senior_s' , 'daily' , 'realty' , 'best' , 'baedalbu' , 'massage' , 'hairjob' , 'gangsa' , 'mihwa' , 'sikdang' , 'car' , 'welding' , 'nightwork' , 'maknodong' , 'drugstore' , 'parking' , 'cafe' ) ";
수정 후:
$sql .= " and gr_id in ( 'hnbuilder') ";
또는,
$sql .= " and gr_id = 'hnbuilder' ";