|
Vets help pets stay healthy.
<%
' this code opens the database
ORDERBY=request.querystring("ORDERBY")
if ORDERBY = "" then
ORDERBY = "CLINIC"
end if
numrecords = "0"
set conn = Server.CreateObject("ADODB.Connection")
conn.open "DSN=GENESEE;uid=nothing;pwd=nothing"
sql = "select count(clinic) from VET_CLINICS where CLINIC <> '[Select]'"
set rs = conn.execute(sql)
if not rs.eof then numrecords = rs(0)
sql = "select * from VET_CLINICS where CLINIC <> '[Select]' order by " & ORDERBY
set rs = conn.execute(sql)
'response.write("There are " & numrecords & " records listed.")
'//SECURITY TO MAKE SURE THE PAGE DOES NOT GET PROPOGATED IF NO RECORDS EXIST. SENDS USER TO searchfail.asp
If numrecords = "0" then
%>
No results match.
<%else%>
The following matched your search of "<%=SEARCH_TEXT%>":
There are <%=numrecords%> facilities listed.
|