%@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") %>