<%@LANGUAGE="VBSCRIPT"%> <% Function SQLSafe(strSQL) sqlSafe=Replace(strSQL,"'","\'") end function Dim objRS 'Recordset Dim strSQL 'SQL Dim Page_Size 'How many records to display per page Dim Current_Page 'Which page are we on Dim Page_Count 'How many pages are there? 'here we set the number of records viewed per page Page_Size = 10 If Request("Page")="" Then Current_Page = 1 Else Current_Page = CInt(Request("Page")) End If 'here we set the number of records viewed per page strSQL = "SELECT tblfaqs.pk, faqcategory, tblfaqs.question, tblfaqs.timestamp, tblfaqs.title, tblfaqs.submittername, tblfaqs.submitterhandicap, tblfaqs.submitterclub " & _ "FROM tblfaqs " & _ "inner join tblfaqcategory on tblfaqcategory.pk = tblfaqs.fkfaqcategory " & _ "WHERE (tblfaqs.question like '%" & SQLSafe(request("searchtext")) & "%' " & _ "OR tblfaqs.answer like '%" & SQLSafe(request("searchtext")) & "%') " & _ "AND tblfaqcategory.idlang='eng' " & _ " ORDER BY timestamp DESC" Set objRS = Server.CreateObject("ADODB.RecordSet") objRS.CursorLocation = 3 'adUseClient objRS.PageSize = Page_Size objRS.Open strSQL, strConnectionSTRING, 3, 1, &H0001 Dim objRSFAQ 'Recordset strSQL = "SELECT pk, faqcategory, idlang FROM tblfaqcategory WHERE idlang='eng' ORDER BY pageorder" Set objRSFAQ = Server.CreateObject("ADODB.RecordSet") objRSFAQ.Open strSQL, strConnectionSTRING With objRS %> Mizuno

<%= faqtitle %> - <%= request("faqcat") %>

<% if objRSFAQ.eof = false then while not objRSFAQ.eof %> <% objRSFAQ.movenext wend end if objRSFAQ.close Set objRSFAQ = Nothing %>
<%= faq %>
&faqcat=<%= objRSFAQ.fields("faqcategory") %>"><%= objRSFAQ.fields("faqcategory") %>
 
<%= faqsearch2 %>:    
 
 
<% if .eof = false then Page_Count = .PageCount If 1 > Current_Page Then Current_Page = 1 If Current_Page > Page_Count Then Current_Page = Page_Count ' Set our current recordset page .AbsolutePage = Current_Page Do While .AbsolutePage = Current_Page AND Not .EOF ' Repeat Process Here for each record %> <% .movenext Loop %> <% else %> <% end if end with %>
<%= faqsearch1 %> FAQ
<%= FormatDisplay(.fields("timestamp").value) %> "> <%If (.Fields("submittername").Value) <> "" Then %> <%= .fields("submittername") %> <%= .fields("submitterclub") %>, <%= .fields("submitterhandicap") %> hcap
<%End If%> <%= .fields("title") %>
 
<% 'below is the page navigation. If Current_Page <> 1 Then %> &faqcat=<%= request("faqcat") %>">Previous Page <% End If %> <%= faqsearch5 %>  <%=Current_Page%> of <%=Page_Count%> <% If Current_Page < Page_Count Then %> &faqcat=<%= request("faqcat") %>"><%= faqsearch6 %> <% End If %>
We do not have any FAQs in this category