회원검색 조건문 관련
본문
회원검색에서
$sql_common = " from $g4[member_table] ";
$qstr = "";
if (isset($Usex)) $qstr .= '&Usex=' . urlencode($Usex);
if (isset($UageF)) $qstr .= '&UageF=' . urlencode($UageF);
if (isset($UageT)) $qstr .= '&UageT=' . urlencode($UageT);
if (isset($Uid)) $qstr .= '&Uid=' . urlencode($Uid);
if (isset($UregF)) $qstr .= '&UregF=' . urlencode($UregF);
if (isset($UregT)) $qstr .= '&UregT=' . urlencode($UregT);
if (isset($Uid3)) $qstr .= '&Uid3=' . urlencode($Uid3);
if (isset($Uid6)) $qstr .= '&Uid6=' . urlencode($Uid6);
$sql_search = " where (1) ";
if ($Usex) { $sql_search .= " and (mb_sex = '$Usex') "; }
if ($UageF) { $sql_search .= " and (mb_birth <= '$UageF') "; }
if ($UageT) { $sql_search .= " and (mb_birth >= '$UageT') "; }
if ($Uid3) { $sql_search .= " and (mb_3 = '$Uid3') "; }
if ($Uid6) { $sql_search .= " and (mb_6 = '$Uid6') "; }
if ($Uid) { $sql_search .= " and (mb_nick like '%$Uid%') "; }
if ($UregF) { $sql_search .= " and (mb_2 = '$UregF') "; }
if ($UregT) { $sql_search .= " and (mb_datetime <= '$UregT') "; }
if (!$sst) {
$sst = "mb_today_login";
$sod = "desc";
}
최근에 접속한 순서로 나타나게 되는데요~ 여기에 mb_1 의 값이 1인 회원들만 나타나게 하려면 어찌해야하나요...
즉 최근 접속한 순으로 mb_1 의 값이 1인 회원만 ...
어렵네요 ㅜㅜ
답변 2
$sql_common = " from $g4[member_table] ";
$qstr = "";
if (isset($Usex)) $qstr .= '&Usex=' . urlencode($Usex);
if (isset($UageF)) $qstr .= '&UageF=' . urlencode($UageF);
if (isset($UageT)) $qstr .= '&UageT=' . urlencode($UageT);
if (isset($Uid)) $qstr .= '&Uid=' . urlencode($Uid);
if (isset($UregF)) $qstr .= '&UregF=' . urlencode($UregF);
if (isset($UregT)) $qstr .= '&UregT=' . urlencode($UregT);
if (isset($Uid3)) $qstr .= '&Uid3=' . urlencode($Uid3);
if (isset($Uid6)) $qstr .= '&Uid6=' . urlencode($Uid6);
$sql_search = " where (1) ";
if ($Usex) { $sql_search .= " and (mb_sex = '$Usex') "; }
if ($UageF) { $sql_search .= " and (mb_birth <= '$UageF') "; }
if ($UageT) { $sql_search .= " and (mb_birth >= '$UageT') "; }
if ($Uid3) { $sql_search .= " and (mb_3 = '$Uid3') "; }
if ($Uid6) { $sql_search .= " and (mb_6 = '$Uid6') "; }
if ($Uid) { $sql_search .= " and (mb_nick like '%$Uid%') "; }
if ($UregF) { $sql_search .= " and (mb_2 = '$UregF') "; }
if ($UregT) { $sql_search .= " and (mb_datetime <= '$UregT') "; }
$sql_search .= " and (mb_1 = '1') "; // 추가
if (!$sst) {
$sst = "mb_today_login";
$sod = "desc";
}
요로코롬 하면 되지 않을까요?
와우 감사합니다~ 대박사건~ 눈물이 펑펑~ 완전 100퍼 해결했습니다~
답변을 작성하시기 전에 로그인 해주세요.