if request("ckc")="查" then
if request("bh")<>""then
if cond="" then
cond="编号 like '%" & trim(request("bh")) & "%'"
else
cond = cond & " AND 编号 like '%" & trim(request("bh")) & "%'"
end if
end if
if request("ckbh")<>""then
if cond="" then
cond="出库编号 like '%" & trim(request("ckbh")) & "%'"
else
cond = cond & " AND 出库编号 like '%" & trim(request("ckbh")) & "%'"
end if
end if
if request("clmc")<>"" then
If cond="" Then
cond="材料名称 like '%" & trim(request("clmc")) & "%'"
else
cond = cond & "and 材料名称 like '%" & trim(request("clmc")) & "%'"
end if
end if
if request("ksrq")<>"" then
if cond="" then
cond="日期>=# " & trim(request("ksrq")) & "#"
else
cond=cond & "and 日期>=# " & trim(request("ksrq")) & "#"
end if
end if
if request("jsrq")<>"" then
if cond="" then
cond="日期<=# " & trim(request("jsrq")) & "#"
else
cond=cond &"and 日期<=# " & trim(request("jsrq")) & "#"
end if
end if
if request("dcdw")<>""then
if cond="" then
cond="调出单位 like '%" & trim(request("dcdw")) & "%'"
else
cond = cond & " AND 调出单位 like '%" & trim(request("dcdw")) & "%'"
end if
end if
if request("drdw")<>""then
if cond="" then
cond="调入单位 like '%" & trim(request("drdw")) & "%'"
else
cond = cond & " AND 调入单位 like '%" & trim(request("drdw")) & "%'"
end if
end if
if cond<>""then
sql="select * from 出库表 where " & cond & "order by 日期"
else
sql="select * from 出库表 order by 日期"
end if
session("sql")=(sql)
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
å®å ¨ä¸æ ·çåæ³åï¼åªæ¯åéåé¢å 个$ãthenç¨{}代æ¿çï¼ä¾å¦åå è¡ä»£ç è¿æ ·ï¼
$cond='';if ($_POST["ckc"]=="æ¥"){
if ($_POST["bh"]!="") {
if ($cond=="") $cond="ç¼å· like '%" & trim(request("bh")) & "%'";
else $cond = cond . " AND ç¼å· like '%" & trim(request("bh")) & "%'";
}