<% dim connection, rs, ps, qs, ss, cs, countx set connection=server.createobject("adodb.connection") connection.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("/databases/membersx.mdb") set ps = connection.execute("SELECT count(memid) AS countx FROM members WHERE name<>'admin' AND img<>''") randomize() mpick = int(ps("countx") * Rnd())+1 set rs = connection.Execute("SELECT * FROM members WHERE name<>'admin' AND img<>''") SQL = "SELECT Categories.Category, Count(members.MemId) AS county" &_ " FROM members INNER JOIN (Categories INNER JOIN catlink ON Categories.CatId = catlink.CatId) ON" &_ " members.MemId = catlink.MemId" &_ " WHERE members.img<>''"&_ " GROUP BY Categories.Category HAVING Categories.Category='Attractions'" set qs = connection.execute(SQL) randomize() apick = int(qs("county") * Rnd())+1 SQS = "SELECT members.*, Categories.Category FROM Categories" &_ " INNER JOIN (members INNER JOIN catlink ON members.MemId = catlink.MemId)" &_ " ON Categories.CatId = catlink.CatId WHERE Categories.Category='Attractions' AND members.img<>''" set ss = connection.Execute(SQS) SQK = "SELECT Categories.Category, Count(members.MemId) AS countt" &_ " FROM members INNER JOIN (Categories INNER JOIN catlink ON Categories.CatId = catlink.CatId) ON" &_ " members.MemId = catlink.MemId" &_ " WHERE members.img<>''"&_ " GROUP BY Categories.Category HAVING Categories.Category='Community Organisations'" set ws = connection.execute(SQK) randomize() cpick = int(ws("countt") * Rnd())+1 SQT = "SELECT members.*, Categories.Category FROM Categories" &_ " INNER JOIN (members INNER JOIN catlink ON members.MemId = catlink.MemId)" &_ " ON Categories.CatId = catlink.CatId WHERE Categories.Category='Community Organisations' AND members.img<>''" set cs = connection.Execute(SQT) %> Mount Macedon District Business and Tourism Association
 


Welcome to Mount Macedon District Business and Tourism Online, known as Mount Macedon Online.

This Project is a joint initiative of the Victorian Government's StreetLife program in conjunction with the Mount Macedon Business and Tourism Association and Macedon Ranges Shire Council.

You maybe aware of some of Australia's destinations and tourism attractions. However thousands more lay hidden unknown to most travellers and even most locals.The town of Mount Macedon is just one of them. Mount Macedon is one of 9 villages that make up the Macedon Ranges Shire in Victoria.

 
 
Business Profile Featured Attraction
<% do while not rs.eof %> <% a = a + 1 if a = mpick then %> " width="100" height="75" border="2" align="left"><%=rs("name")%>
<%=rs("address")%>
<%=rs("city")%>

Ph: <%=rs("phone")%>
<%end if%> <% rs.movenext %> <% loop %>
<% do while not ss.eof %> <% b = b + 1 if b = apick then %> " width="100" height="75" border="2" align="right"><%=ss("name")%>
<%=ss("address")%>
<%=ss("city")%>

Ph: <%=ss("phone")%>
<%end if%> <% ss.movenext %> <% loop %>
  Community Profile
  <% do while not cs.eof %> <% c = c + 1 if c = cpick then %> " width="100" height="75" border="2" align="right"><%=cs("name")%>
<%=cs("address")%>
<%=cs("city")%>

Ph: <%=cs("phone")%>
<%end if%> <% cs.movenext %> <% loop %>