% catcode = Request("cc") scatcode = Request("scc") if catcode="" then catcode=0 end if condition="" if scatcode<>"" then condition = " and scatcode=" & scatcode else scatcode=0 end if midx=catcode+1 set rst=server.CreateObject("adodb.recordset") rst.lockType=3 rst.cursorlocation=3 rst.cursorType=2 set rst1=server.CreateObject("adodb.recordset") rst1.lockType=3 rst1.cursorlocation=3 rst1.cursorType=2 sql="select * from scategory where catcode= "&catcode&" and scatstatus='Y' " & condition & " order by scatcode" rst.open sql,con if rst.RecordCount<>0 then scatname=rst("scatname") scatdesc=rst("scatdesc") scatcode=rst("scatcode") end if rst.close %>
<%=scatdesc%>
<% sql="select * from products where catcode= "&catcode&" and scatcode= "&scatcode&" and pstatus='Y' order by pcode" rst.open sql,con if rst.RecordCount<>0 then count=0 %> <%end if rst.close%>