% 'connection objects Set conn = CreateObject("ADODB.Connection") Set rs = CreateObject("ADODB.Recordset") conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("../data/directory.mdb") dim sql dim category dim header dim body dim i 'display total sql = "" & _ "SELECT Count(ID) AS [Count] " & _ "FROM Links " & _ "WHERE Active=true" rs.open sql, conn, 1, 2, 1 header = "
Weight Loss Directory (" & rs("Count") & ")
" rs.close 'display cats sql = "" & _ "SELECT Categories.ID, Categories.Description, Count(Links.ID) AS [Count] " & _ "FROM Categories INNER JOIN Links ON Categories.ID = Links.CategoryID " & _ "WHERE Links.Active=true " & _ "GROUP BY Categories.Description, Categories.ID" rs.open sql, conn, 1, 2, 1 header = header & "" & rs("Description") & "
" rs.close sql = "Select * From Links Where CategoryID = " & category & " And Active = true Order By Title;" rs.open sql, conn, 1, 2, 1 while not rs.eof body = body & "" & rs("Title") & " - " & rs("Description") & "
" rs.movenext wend rs.close %>
|
|||
|
Home |
|||
|
<%= header %> <%= body %> |
![]() |
||
| Home Copyright © 2003 One Spirit Inc., All Rights Reserved |
|||