<% dim sSQL strDBPath = Server.MapPath("/App_Data/brittons.mdb") Set cnnSimple = Server.CreateObject("ADODB.Connection") cnnSimple.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & strDBPath & "; PWD=" Set rs = Server.CreateObject("ADODB.Recordset") Set rs2 = Server.CreateObject("ADODB.Recordset") %>

 

 

Watches A-Z

<%Call display_watches("gents")%>
<%Call display_watches("ladies")%>
<%Call display_watches("unisex")%>

 

Other Makes

<%Call display_others("gents")%>
<%Call display_others("ladies")%>
<%Call display_others("unisex")%>
<% sSQL = "SELECT Count(*) FROM Watches" rs.Open sSQL, cnnSimple, 1, 3 %>
Click HERE to discover many interesting facts about the above brands of watches, including production dates and the origin of the company. Also how to date your watch by serial number along with other relevant information.


Total Watches: <%=string(5 - len(rs(0)), "0") & rs(0)%>

 


 


<% rs.close Set rs = Nothing Set rs2 = Nothing cnnSimple.Close Set cnnSimple = Nothing %> <% sub display_watches(sex) 'show only these watches makes w = "'A. LANGE AND SOHNE' OR make = " w = w & "'AUDEMARS PIGUET' OR make = " w = w & "'BLANCPAIN' OR make = " w = w & "'BREGUET' OR make = " w = w & "'BREITLING' OR make = " w = w & "'CARTIER' OR make = " w = w & "'CHOPARD' OR make = " w = w & "'LONGINES' OR make = " w = w & "'IWC' OR make = " w = w & "'JAEGER-LECOULTRE' OR make = " w = w & "'OMEGA' OR make = " w = w & "'PATEK PHILIPPE' OR make = " w = w & "'PIAGET' OR make = " w = w & "'ROLEX' OR make = " w = w & "'ROTARY' OR make = " w = w & "'TAG HEUER' OR make = " w = w & "'ULYSSE NARDIN' OR make = " w = w & "'VACHERON CONSTANTIN' OR make = " w = w & "'ZENITH'" response.write "
" sSQL = "SELECT * FROM Watches WHERE gender = '" & sex & "' AND make = " & w & " ORDER by make ASC" rs.Open sSQL, cnnSimple, 1, 1 Do While Not rs.EOF If rs.Fields("make").Value <> temp then count = make_count(rs.Fields("make").Value, sex) if count <> 0 then %>

  &gender=<%=sex%>"><% op = ucase(rs.fields("make").value) response.write op %> (<%=count%>)
<% end if end if temp = rs.Fields("make").Value rs.MoveNext response.flush Loop rs.close end sub sub display_others(sex) 'show all, but exlude these makes (as shown above) e = "'A. LANGE AND SOHNE' AND make <> " e = e & "'AUDEMARS PIGUET' AND make <> " e = e & "'BLANCPAIN' AND make <> " e = e & "'BREGUET' AND make <> " e = e & "'BREITLING' AND make <> " e = e & "'CARTIER' AND make <> " e = e & "'CHOPARD' AND make <> " e = e & "'LONGINES' AND make <> " e = e & "'IWC' AND make <> " e = e & "'JAEGER-LECOULTRE' AND make <> " e = e & "'OMEGA' AND make <> " e = e & "'PATEK PHILIPPE' AND make <> " e = e & "'PIAGET' AND make <> " e = e & "'ROLEX' AND make <> " e = e & "'ROTARY' AND make <> " e = e & "'TAG HEUER' AND make <> " e = e & "'ULYSSE NARDIN' AND make <> " e = e & "'VACHERON CONSTANTIN' AND make <> " e = e & "'ZENITH' AND make <> " e = e & "'OTHER / UNSIGNED' AND make <> " e = e & "'POCKET GOLD' AND make <> " e = e & "'POCKET SILVER'" response.write "
" sSQL = "SELECT * FROM Watches WHERE gender = '" & sex & "' AND make <> " & e & " ORDER by make ASC" rs.Open sSQL, cnnSimple, 1, 1 Do While Not rs.EOF If rs.Fields("make").Value <> temp then count = make_count(rs.Fields("make").Value, sex) if count <> 0 then %>  &gender=<%=sex%>"><% op = ucase(rs.fields("make").value) response.write op %> (<%=count%>)
<% end if end if temp = rs.Fields("make").Value rs.MoveNext response.flush Loop rs.close 'show only these watches makes w = "'OTHER / UNSIGNED' OR make = " w = w & "'POCKET GOLD' OR make = " w = w & "'POCKET SILVER'" response.write "
" sSQL = "SELECT * FROM Watches WHERE gender = '" & sex & "' AND make = " & w & " ORDER by make ASC" rs.Open sSQL, cnnSimple, 1, 1 Do While Not rs.EOF If rs.Fields("make").Value <> temp then count = make_count(rs.Fields("make").Value, sex) if count <> 0 then %>  &gender=<%=sex%>"><% op = ucase(rs.fields("make").value) response.write op %> (<%=count%>)
<% end if end if temp = rs.Fields("make").Value rs.MoveNext response.flush Loop rs.close end sub function make_count(brand, sex) sSQL = "SELECT Count(*) FROM Watches WHERE MAKE = '" & brand & "' AND gender = '" & sex & "'" rs2.Open sSQL, cnnSimple, 1, 3 make_count = rs2(0) rs2.close end function %>

tumblr site counter