묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
다음과 같은 에러 메세지가 뜨거든여 무엇 때문에 에러가 생기는건지 알수가 없어서여...
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in c:apm_setuphtdocsabookincludelib.abook.php on line 366(elseif문이 해당 줄 라인입니다.)
-----------------------------------------------
if 문으로 구분해서 쿼리 문을 만드는 부분인데요 위와 같은 에러가...
if ( $HTTP_GET_VARS['str1'] != "") {
$sqlQuery = "SELECT DISTINCT * FROM $db_table WHERE ".$HTTP_GET_VARS['field']." LIKE";
# How are we searching the $field
if ($HTTP_GET_VARS['how'] == "begin") {
$sqlQuery .= " '$str%'";
}
elseif ($HTTP_GET_VARS['how'] == "contain") {
$sqlQuery .= " '%".$HTTP_GET_VARS['str1']."%'";
}
elseif ($HTTP_GET_VARS['how'] == "end") {
$sqlQuery .= " '%".$HTTP_GET_VARS['str1']."'";
}
elseif ($HTTP_GET_VARS['how'] == "is") {
$sqlQuery .= " '".$HTTP_GET_VARS['str1']."'";
}
else {
$sqlQuery .= " '%".$HTTP_GET_VARS['str1']."%'";
}
$sqlQuery .= " ORDER BY KoreanNmae ASC;
}
elseif ($HTTP_GET_VARS['field2'] != "" || $HTTP_GET_VARS['Usage_1'] != "") {
$sqlQuery = "SELECT DISTINCT * FROM $db_table WHERE (".$HTTP_GET_VARS['field2']." IN ('$city1','$city2','$city3','$city4','$city5','$city6','$city7','$city8','$city9','$city10','$city11','$city12','$city13','$city14','$city15') and ".$HTTP_GET_VARS['Usage_1']." LIKE '주소록')";
$sqlQuery .= " ORDER BY KoreanNmae ASC;
}
__________________________________________________
고수님들의 고견 부탁들립니다.
php이구여...if문으로 쿼리를 만드는 부분에서 에러가...
2004.11.25 00:20
다음과 같은 에러 메세지가 뜨거든여 무엇 때문에 에러가 생기는건지 알수가 없어서여...
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in c:apm_setuphtdocsabookincludelib.abook.php on line 366(elseif문이 해당 줄 라인입니다.)
-----------------------------------------------
if 문으로 구분해서 쿼리 문을 만드는 부분인데요 위와 같은 에러가...
if ( $HTTP_GET_VARS['str1'] != "") {
$sqlQuery = "SELECT DISTINCT * FROM $db_table WHERE ".$HTTP_GET_VARS['field']." LIKE";
# How are we searching the $field
if ($HTTP_GET_VARS['how'] == "begin") {
$sqlQuery .= " '$str%'";
}
elseif ($HTTP_GET_VARS['how'] == "contain") {
$sqlQuery .= " '%".$HTTP_GET_VARS['str1']."%'";
}
elseif ($HTTP_GET_VARS['how'] == "end") {
$sqlQuery .= " '%".$HTTP_GET_VARS['str1']."'";
}
elseif ($HTTP_GET_VARS['how'] == "is") {
$sqlQuery .= " '".$HTTP_GET_VARS['str1']."'";
}
else {
$sqlQuery .= " '%".$HTTP_GET_VARS['str1']."%'";
}
$sqlQuery .= " ORDER BY KoreanNmae ASC;
}
elseif ($HTTP_GET_VARS['field2'] != "" || $HTTP_GET_VARS['Usage_1'] != "") {
$sqlQuery = "SELECT DISTINCT * FROM $db_table WHERE (".$HTTP_GET_VARS['field2']." IN ('$city1','$city2','$city3','$city4','$city5','$city6','$city7','$city8','$city9','$city10','$city11','$city12','$city13','$city14','$city15') and ".$HTTP_GET_VARS['Usage_1']." LIKE '주소록')";
$sqlQuery .= " ORDER BY KoreanNmae ASC;
}
__________________________________________________
고수님들의 고견 부탁들립니다.