<% Dim CATEGORY_ID CATEGORY_ID = GetValue("CATEGORY_ID") DisplayHeader Writeln("
") Dim rs, sSQL Dim OLD_CATEGORY If IsEmpty(CATEGORY_ID) Then sSQL = "SELECT fc.CATEGORY_NAME, fc.SORT_ORDER, f.* FROM FAQ f, FAQ_CATEGORIES fc WHERE (f.IS_ACTIVE IS NOT NULL) AND f.CATEGORY_ID=fc.CATEGORY_ID ORDER BY fc.SORT_ORDER, f.SORT_ORDER" Else sSQL = "SELECT fc.CATEGORY_NAME, fc.SORT_ORDER, f.* FROM FAQ f, FAQ_CATEGORIES fc WHERE (f.IS_ACTIVE IS NOT NULL) AND f.CATEGORY_ID=fc.CATEGORY_ID AND f.CATEGORY_ID=" & number(CATEGORY_ID) & " ORDER BY fc.SORT_ORDER, f.SORT_ORDER" End If set rs = DB.Execute(sSQL) If rs.EOF then Writeln("
No Frequently Asked Questions for this category.
") Else While Not rs.EOF If OLD_CATEGORY <> rs("CATEGORY_ID") Then Writeln("

" & rs("CATEGORY_NAME") & "

") OLD_CATEGORY = rs("CATEGORY_ID") End If Writeln("
  • " & rs("QUESTION") & "
  • ") rs.MoveNext Wend End If rs.close Writeln("
    ") Writeln("
    ") Writeln("
    ") Writeln("
    ") Writeln("
    ") Writeln("
    ") Writeln("
    ") Writeln("
    ") OLD_CATEGORY = "" If IsEmpty(CATEGORY_ID) Then sSQL = "SELECT fc.CATEGORY_NAME, f.* FROM FAQ f, FAQ_CATEGORIES fc WHERE (f.IS_ACTIVE IS NOT NULL) AND f.CATEGORY_ID=fc.CATEGORY_ID ORDER BY fc.SORT_ORDER, f.SORT_ORDER" Else sSQL = "SELECT fc.CATEGORY_NAME, f.* FROM FAQ f, FAQ_CATEGORIES fc WHERE (f.IS_ACTIVE IS NOT NULL) AND f.CATEGORY_ID=fc.CATEGORY_ID AND f.CATEGORY_ID=" & number(CATEGORY_ID) & " ORDER BY fc.SORT_ORDER, f.SORT_ORDER" End If set rs = DB.Execute(sSQL) While Not rs.EOF If OLD_CATEGORY <> rs("CATEGORY_ID") Then Writeln("" & rs("CATEGORY_NAME") & "") OLD_CATEGORY = rs("CATEGORY_ID") End If Writeln("") Writeln("") Writeln("") Writeln("
    Q: " & rs("QUESTION") & "
    A: " & rs("ANSWER") & "
    Back to Top
    ") rs.MoveNext Wend rs.close Writeln("
    ") Writeln("
    ") Writeln("
    ") Writeln("Click here to ask your own question.