Restaurant Inspections By Date
<%
Dim conn, myrs, monthins, yearins, submit, rcount
set conn=Server.CreateObject("ADODB.Connection")
set myrs=Server.CreateObject("ADODB.Recordset")
submit=request.QueryString("submit")
conn.Open ("DSN=cabellrestinspect;UID=;PWD=;")
if submit="true" then
monthins=Request.Form("month")
yearins=Request.Form("year")
datestring = monthins & "/%/" & yearins
myrs.open "SELECT * FROM InternetQuery WHERE InternetQuery.DATE_OF_INSPECTION Like '" & datestring & "'",conn,3,3
rcount = myrs.recordcount
if rcount = 0 then
Response.Write ("
No records found. Please try again.")
Else
myrs.movefirst
Response.Write ("
| Name of Facility | Address | Date of Inspection | Non Criticals | Criticals | Remarks |
")
Do While Not myrs.eof
Response.Write ("| " & myrs("NAME_OF_FACILITY") & " | " & myrs("STREET_ADDRESS") & " | " & myrs("DATE_OF_INSPECTION")& " | " & myrs("NON_CRITICALS") & " | " & myrs("CRITICALS") & " | " & myrs("REMARKS") & " |
")
myrs.movenext
loop
end if
myrs.close
conn.close
Response.Write ("
")
end if
%>