我试一试,先谢谢了
if Request("user_zhuozhe_name")="" and Request("user_dangwei_file")="" and Request("user_fashong_fangshi")="" then
rs.Source="select sum(freight) as num from client where kfsj between #"&uptime&"# and #"&uptime1&"# order by id desc"
else
if Request("user_fashong_fangshi")="" then
if Request("user_dangwei_file")="" then
rs.Source="select sum(freight) as num from client where zhuozhe_name like '%"&Request("user_zhuozhe_name")&"%' and (kfsj between #"&uptime&"# and #"&uptime1&"#) order by id desc"
else
rs.Source="select sum(freight) as num from client where client_adr like '%"&Request("user_dangwei_file")&"%' and (kfsj between #"&uptime&"# and #"&uptime1&"#) order by id desc"
end if
else
rs.Source="select sum(freight) as num from client where fashong_fangshi like '%"&request("user_fashong_fangshi")&"%' and (kfsj between #"&uptime&"# and #"&uptime1&"#) order by id desc"
end if
end if
个人觉得楼主的查询条件处理的不是很好。