it_10_subj 의 여분필드 검색
본문
<?
if ($stx) {
if ($sfl && in_array($sfl, ['it_name', 'it_10_subj', 'it_id', 'it_maker', 'it_origin', 'it_sell_email', 'it_1', 'it_2'])) {
$sql_search .= " AND $sfl LIKE '%$stx%'";
}
}
?>
<span>
<label class="select" style="width:200px">
<select name="sfl" id="sfl">
<option value="it_name" <?php echo get_selected($sfl, 'it_name'); ?>>상품명</option>
<option value="it_10_subj" <?php echo get_selected($sfl, 'it_10_subj'); ?>>ㅇ옵션1</option>
<option value="it_id" <?php echo get_selected($sfl, 'it_id'); ?>>상품코드</option>
<option value="it_maker" <?php echo get_selected($sfl, 'it_maker'); ?>>제조사</option>
<option value="it_origin" <?php echo get_selected($sfl, 'it_origin'); ?>>원산지</option>
<option value="it_sell_email" <?php echo get_selected($sfl, 'it_sell_email'); ?>>판매자 e-mail</option>
</select><i></i>
</label>
</span>
관리자 모드에서 옵션 1을 추가 했는데 검색이 되지 않아서요 혹시 제가 놓친 부분이 있을까요?
답변 2
it_10 에 여분필드 값이 저장됩니다.
it_10_subj 는 여분필드 명이 저장되는 겁니다.
쿼리구문이 정상적으로 구성 되었는지 확인해보세요
echo $sql; 확인과
sql_query($sql, true); <--true넣어서 에러나오는지 확인