28,391
社区成员
发帖
与我相关
我的任务
分享
<title>查询结果</title>
<%
week=trim(Request.Form("week"))
project=trim(Request.Form("project"))
pro=trim(Request.Form("pro"))
kind=trim(Request.Form("kind"))
des=trim(Request.Form("des"))
prin=trim(Request.Form("prin"))
dt=trim(Request.Form("dt"))
start=trim(Request.Form("start"))
endt=trim(Request.Form("endt"))
sql="select * from week where "
if dt=1 then
if week<>empty or len(week)>1 then
sql=sql&"week='"&week&"'"
end if
if project<>empty or len(project)>1 then
sql=sql&"and J_project='"&project&"'"
end if
if pro<>empty or len(pro)>1 then
sql=sql&"and J_pro='"&pro&"'"
end if
if kind<>empty or len(kind)>1 then
sql=sql&"and J_sort='"&kind&"'"
end if
if des<>empty or len(des)>1 then
sql=sql&"and J_des='"&des&"'"
end if
if prin<>empty or len(prin)>1 then
sql=sql&"and J_prin='"&prin&"'"
end if
else
if project<>empty or len(project)>1 then
sql=sql&"and J_project='"&project&"'"
end if
if pro<>empty or len(pro)>1 then
sql=sql&"and J_pro='"&pro&"'"
end if
if kind<>empty or len(kind)>1 then
sql=sql&"and J_sort='"&kind&"'"
end if
if des<>empty or len(des)>1 then
sql=sql&"and J_des='"&des&"'"
end if
if prin<>empty or len(prin)>1 then
sql=sql&"and J_prin='"&prin&"'"
end if
if start<>empty or len(start)>1 and endt<>empty then
sql=sql&"and year between #"&start&"# and #"&endt&"#"
end if
end if
Dim rs
Dim rs_numRows
Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = MM_conn_STRING
rs.Source =sql
rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 1
rs.Open()
rs_numRows = 0
%>