请问这个如何实现多个搜索,想了两天,不知道该怎么安排
代码:
Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = MM_conn_STRING
if Session("LevelChonst0")="" Then
sql = "SELECT * FROM Co_Info where [Area] = '"&Session("LevelChonst0")&"' OR [Area] = '"&Session("LevelChonst1")&"' OR [Area] = '"&Session("LevelChonst2")&"' OR [Area] = '"&Session("LevelChonst3")&"' OR [Area] = '"&Session("LevelChonst4")&"' OR [Area] = '"&Session("LevelChonst5")&"' OR [Area] = '"&Session("LevelChonst6")&"' OR [Area] = '"&Session("LevelChonst7")&"'"
if act = "sear" then
if Co_id <> "" then
sql = " SELECT * FROM Co_Info where Co_id like '%" & Co_id & "%'"
end if
if Co_Name <> "" then
sql = " SELECT * FROM Co_Info where Co_Name like '%" & Co_Name & "%'"
end if
if Co_Manager <> "" then
sql = " SELECT * FROM Co_Info where Co_Manager like '%" & Co_Manager & "%'"
end if
if Co_Tel <> "" then
sql = " SELECT * FROM Co_Info where Co_Tel like '%" & Co_Tel & "%'"
end if
if Co_handset <> "" then
sql = " SELECT * FROM Co_Info where Where Co_handset like '%" & Co_handset & "%'"
end if
if Area <> "" then
sql = " SELECT * FROM Co_Info where Area like '%" & Area & "%'"
end if
end if
sql = sql & " ORDER BY Add_Time DESC"