IF
ELSEIF
END IF
IF Keyword="" THEN
Response.Redirect "index.asp"
END IF
If isTreaty="1" And isshop="" Then
SQL = "proc_getTreatyCommunity"
ElseIf isTreaty="1" And isshop="1" Then
SQL = "proc_getTreatyShops"
Elseif nnearby ="" Then
Parameter = "'""" & Keyword & """'"
SQL ="proc_getTitle " & Parameter & "," & nCity
Else
Parameter = "'""" & Keyword & """'"
nNearby = "'""" & nNearby & """'"
SQL ="PROC_getnearBy "&nNearby&",'"& nCity&"',"&Parameter
End If
IF
ELSE IF
END IF
IF Keyword="" THEN
Response.Redirect "index.asp"
END IF
If isTreaty="1" And isshop="" Then
SQL = "proc_getTreatyCommunity"
ElseIf isTreaty="1" And isshop="1" Then
SQL = "proc_getTreatyShops"
Elseif nnearby ="" Then
Parameter = "'""" & Keyword & """'"
SQL ="proc_getTitle " & Parameter & "," & nCity
Else
Parameter = "'""" & Keyword & """'"
nNearby = "'""" & nNearby & """'"
SQL ="PROC_getnearBy "&nNearby&",'"& nCity&"',"&Parameter
End If
END If
END If
需要在下面多谢几个END IF
所以大家要记住写成ELSEIF,不要写成ELSE IF
转载于:https://www.cnblogs.com/kaixin110/archive/2009/02/11/1387997.html