Ok I have 3 tables:
Table 1: WaterBodies
WaterBodyID
WaterBodyName
Table 2: Listings
ListingID
Status (active = 1)
Table 3: WaterbodyJoin
WaterBodyID
ListingId
How could I get the WaterBodyname to appear and get the listcount of active listings in a select field. I have the following now:
Code:
<select name="WaterBody">
<option value="">Select WaterBody</option>
<%
set waterRst = GetFromDatabase ("Select * from tblWaterBodies Order by WaterBodyname")
Do While not(waterRst.EOF)%>
<option value="<%=waterRst("WaterBodyID")%>"><%=waterRst("WaterBodyName")%></option>
<% waterRst.MoveNext
Loop
set waterRst = nothing %>
</select>