// 탈퇴, 차단된 회원은 제외
$sql_where .= " and mb_leave_date = '' and mb_intercept_date = '' ";
// 검색에서 제외하고 싶은 mb_id를 한줄단위로 원하는만큼 계속 추가한다.
$sql_where .= " and mb_id <> 'admin' "; // admin 을 제외하고자 할경우
$sql_where .= " and mb_id <> 'test' "; // test 를 제외하고자 할경우
댓글 4개
// 탈퇴, 차단된 회원은 제외
$sql_where .= " and mb_leave_date = '' and mb_intercept_date = '' ";
// 검색에서 제외하고 싶은 mb_id를 한줄단위로 원하는만큼 계속 추가한다.
$sql_where .= " and mb_id <> 'admin' "; // admin 을 제외하고자 할경우
$sql_where .= " and mb_id <> 'test' "; // test 를 제외하고자 할경우
그런데 제가 질문하는 것은 어드민 혹은 테스트 제외해야 하는데
어느땐 제외 대상이 아닌데 어느땐 제외대상이에요...
그래서 아래의 소스가
<select size=25 name='list' style='width:500px;'>
<option>번호 . 회원아이디 / 이름 / 별명 / 생일 / E-mail
<?
$sql = " select mb_id, mb_name, mb_nick, mb_email, mb_birth, mb_datetime $sql_common $sql_where order by mb_id ";
$result = sql_query($sql);
$i=0;
$ma_list = "";
$cr = "";
while ($row=sql_fetch_array($result))
{
$i++;
echo "<option>$i . $row[mb_id] / $row[mb_name] / $row[mb_nick] / $row[mb_birth] / $row[mb_email]";
$ma_list .= $cr . $row[mb_email] . "||" . $row[mb_id] . "||" . $row[mb_name] . "||" . $row[mb_nick] . "||" . $row[mb_birth] . "||" . $row[mb_datetime];
$cr = "\n";
}
?>
</select>
<textarea name="ma_list" style="display:none"><?=$ma_list?></textarea>
textarea에서 보여지는데 <select 에서 멀티로 출력하고
선택을 했을 경우 그중에 선택한 사람만 보내지는 아니면 제외되는 것을 말씀드린거에요.
상세한 질문을 드렸어야 하는데 죄송합니다...