strSQL="SELECT * FROM cart WHERE cartID LIKE '%%'"
If Request.form("chk_name")="YES" Then
name = Request.form("name")
strSQL = strSQL & " and name LIKE '%" & name & "%'"
links = links & "name="&name&"&chk_name=YES"
End if
if Request.form("chk_year")="YES" Then
syear =Request.Form("year")
strSQL =strSQL & " and year(tm)=" & syear & ""
links = links & "&syear="&syear&"&chk_year=YES"
End if
If Request.form("chk_month")="YES" Then
smonth =Request.Form("month")
strSQL =strSQL & " and month(tm)=" & smonth & ""
links = links & "&smonth="&smonth&"&chk_month=YES"
End if
If Request.form("chk_day")="YES" Then
sday =Request.Form("day")
strSQL =strSQL & " and day(tm)=" & sday & ""
links = links & "&sday="&sday&"&chk_day=YES"
End if
strSQL =strSQL & " Order by cartID "&fs&""
set list=server.createobject("adodb.recordset")
list.open strSQL,conn,1,2
sql="select * from tab where 1=1 "
if year1<>"" and month1<>"" and day1<>"" then sqls=sqls & " AND year=" & year & " and month =" ..........
if client<>"" then sqls=sqls & " AND client='" & client & "'"
sql="select * from tab where 1=1 "
if year1<>"" and month1<>"" and day1<>"" then sqls=sqls & " year=" & year & " and month =" ..........
if client<>"" then sqls=sqls & " client='" & client & "'"