Sort tags alphabetically or by occurance.
<% if sort = "occur" then sql = "SELECT * FROM wordTags ORDER BY count ASC" end if if sort = "alpha" OR sort = "" OR sort = " " then sql = "SELECT * FROM wordTags ORDER BY tag ASC" end if set rsTags = conn1.execute(sql) do while NOT rsTags.eof tag = rsTags.fields("tag") count = rsTags.fields("count") if count > 0 and count < 3 then font = 1 end if if count >= 4 and count < 10 then font = 2 end if if count >=10 and count < 15 then font = 3 end if if count >= 15 then font = 4 end if %> <% if tagCall = tag then %> <%p tag%> <% else %> <%p tag%> <% end if rsTags.moveNext loop %>
<% tagCall = request.queryString("tagCall") if tagCall = "999" then %>
or view all entries
<% else %>or view all entries
<% end if%><% if tagCall = "999" then sql = "SELECT * FROM blog ORDER BY [orderKey] DESC" %> All entries
<% else sql = "SELECT * FROM blog WHERE tag1='" & tagCall &"' OR tag2='" & tagCall &"' OR tag3='" & tagCall & "' OR tag4='" & tagCall & "'OR tag5='" & tagCall & "' ORDER BY [orderKey] DESC" %> Entries tagged as "<%p tagCall%>"
<% end if set rsEntries = conn1.execute(sql) do while NOT rsEntries.eof titlePre = rsEntries.fields("title") title1 = replace(titlePre,"[[]]","""") title = replace (title1,"[]","'") permKey = rsEntries.fields("permKey") %> <%p title%>
<% rsEntries.moveNext loop %>
<% 'CLEANUP conn1.close 'close the database %>