% Const adOpenKeyset = 1 Const adLockOptimistic = 3 Dim VClass Dim strPrice Dim strSearch strSearch = (Trim(Request("Search"))) DIM mySQL, objRS Set objRS = Server.CreateObject("ADODB.Recordset") mySQL = "SELECT * FROM Products Where (ItemNumber = '"& strSearch &"' Or Description Like '%"& strSearch &"%' Or Details Like '%"& strSearch &"%' Or Features Like '%"& strSearch &"%') Order By ItemNumber" objRS.Open mySQL, objConn, 1, 3 DIM mySQL1, objRS1 Set objRS1 = Server.CreateObject("ADODB.Recordset") mySQL1 = "SELECT * FROM Products Where (ItemNumber = '"& strSearch &"' Or Description Like '%"& strSearch &"%' Or Details Like '%"& strSearch &"%' Or Features Like '%"& strSearch &"%')" objRS1.Open mySQL1, objConn Dim strCount strCount = 0 Do While Not objRS1.EOF If objRS1("Hide") = "Yes" Then strCount = CInt(strCount) - 1 Else End If strCount = CInt(strCount) + 1 objRS1.MoveNext Loop If objRS.EOF Then Else ' Setup Query Recordset objRS.PageSize = 25 Dim PageNo Dim c Dim j Dim strPageCount strPageCount = objRS.PageCount ' Adjust PageNumber as Appropriate If Request("PageNo") = "" Then PageNo = 1 Else PageNo = Request("PageNo") End If objRS.AbsolutePage = PageNo End If Function Skip() If objRS("Hide") = "Yes" Then objRS.MoveNext If objRS.EOF Then Exit Function Else Call Skip() End If Else If objRS("Price") <> "" Then strPrice = objRS("Price") Else strPrice = 0 End If If objRS("OnSale") = "Yes" Then strPrice = objRS("SalePrice") Else End If End If End Function %>
| ||||
| "><%= objRS("ItemNumber") %> | "><%= objRS("Description") %> | "><%= strCurrencySymbol %><%= FormatNumber(strPrice,2) %> |
Page <%= PageNo %> of <%= objRS.PageCount %> pages.
<%
If PageNo > 1 Then
Dim strBack
strBack = CInt(PageNo) - 1
%>
<<Back
<% End If %>
<% For c = 1 to objRS.PageCount %>
<%=c%>
<% Next %>
<%
If CInt(PageNo) <> CInt(strPageCount) Then
Dim strNext
strNext = CInt(PageNo) + 1
%>
Next>>
<% End If %>
<% End If %>