| All Trout Fishing Products |
 |
<%
'Read Database
mySQL = "SELECT Categories.idCategory, Categories.categoryDesc, " _
& "products.idProduct, products.description " _
& "FROM (Categories INNER JOIN Categories_Products "_
& "ON Categories.idCategory = Categories_Products.idCategory) " _
& "INNER JOIN products ON Categories_Products.idProduct = products.idProduct " _
& "WHERE active = -1 " _
& "ORDER BY Categories.idCategory, products.idProduct"
'Create and Open recordset
set rsTemp = openRSopen(mySQL,0,adOpenStatic,adLockReadOnly,adCmdText,prodPerPage)
'Check if any records were returned
if not rstemp.eof then
'Get Page to show (if any)
curPage = Request.Form("curPage")
if len(curPage) = 0 then
curPage = Request.QueryString("curPage")
end if
if len(curPage) = 0 or not isNumeric(curPage) then
curPage = 1
else
curPage = CLng(curPage)
end if
'Go to requested page
rstemp.MoveFirst
rstemp.PageSize = prodPerPage
totalPages = rstemp.PageCount
rstemp.AbsolutePage = curPage
%>
| <%=navbarOverview("sitemap.asp","idProduct=" & idProduct)%> |
<%
'Read through recordset and display all products
do while not rstemp.eof and count <= rstemp.pageSize 'must be less or equal otherwise last record on page is missing
temp1=rsTemp("idCategory")
if temp1 <> temp then
if col=2 then
response.write " | "
end if
response.write " | "
response.write "| " & rsTemp("categoryDesc") &" | "
col=1
temp=rsTemp("idCategory")
end if
if col=3 then
response.write ""
col=1
end if
response.write " "
response.write " " & rsTemp("description") & " | "
col=col+1
count=count+1
rstemp.moveNext
loop
if col=2 then
response.write " | "
end if
else
%>
| No products yet |
<%
end if
call closeRS(rsTemp)
%>
 |
| <%=navbarOverview("sitemap.asp","idProduct=" & idProduct)%> |
|