<%
Dim Conn,strSQL,objRec
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("database.mdb"),"" , ""
'*** Search By Name or Email ***'
strSQL = "SELECT * FROM customer WHERE 1=1 "
IF Request.QueryString("date") <> "" Then
strSQL = strSQL & " AND (Datenotified BETWEEN '"& Request.QueryString("date") &"' and '"& Request.QueryString("date1") &"') "
End IF
IF Request.QueryString("txtnameshop") <> "" Then
strSQL = strSQL & " AND (nameshop LIKE '%"& Request.QueryString("txtnameshop") &"%') "
End IF
IF Request.QueryString("txttypeshop") <> "" Then
strSQL = strSQL & " AND (Typeshop LIKE '%"& Request.QueryString("txttypeshop") &"%') "
End IF
IF Request.QueryString("txtstatere") <> "" Then
strSQL = strSQL & " AND (Staterequirements LIKE '%"& Request.QueryString("txtstatere") &"%') "
End IF
IF Request.QueryString("txtuser") <> "" Then
strSQL = strSQL & " AND (User LIKE '%"& Request.QueryString("txtuser") &"%') "
End IF
IF Request.QueryString("radiobutton") <> "" Then
strSQL = strSQL & " AND (Status LIKE '%"& Request.QueryString("radiobutton") &"%') "
End IF
IF Request.QueryString("txtmerchant") <> "" Then
strSQL = strSQL & " AND (MerchantID LIKE '%"& Request.QueryString("txtmerchant") &"%') "
End IF
strSQL = strSQL & "order by Status asc"
Set objRec = Server.CreateObject("ADODB.Recordset")
objRec.Open strSQL, Conn, 1,3
Dim PageLen,PageNo,TotalRecord,TotalPage,No,intID
PageLen = 50
PageNo = Request.QueryString("Page")
if PageNo = "" Then PageNo = 1
TotalRecord = objRec.RecordCount
objRec.PageSize = PageLen
TotalPage = objRec.PageCount
objRec.AbsolutePage = PageNo
If objRec.EOF = "" Then
Response.write("ไม่มีข้อมูลในตาราง !")
Else
%>