<% function thenext newrs=server.CreateObject("adodb.recordset") sql="select top 1 * from product where oid>"&a1&" and productsort="&productsort&" order by oid asc" set newrs=conn.execute(sql) if newrs.eof then response.Write("暂无下一个") else a2=newrs("id") response.Write("下一个") end if end function %> <% function thehead headrs=server.CreateObject("adodb.recordset") sql="select top 1 * from product where oid<"&a1&" and productsort="&productsort&" order by oid desc" set headrs=conn.execute(sql) if headrs.eof then response.Write("暂无上一个") else a0=headrs("id") response.Write("上一个") end if end function %>
产品详细 <%dim id,productsort id=request("id") productsort=cint(request("productsort")) set rssort=server.CreateObject("adodb.recordset") rssort.open "select * from productsort where id="&productsort,conn,1,1 %>所属栏目:" style="color:004A93; text-decoration:underline;"><%=rssort("name")%>
<%set rs=server.createObject("adodb.recordset") rs.open "select * from product where id="&id,conn,1,1%> <% a1=rs("oid") %> <%rssort.close set rssort=nothing rs.close set rs=nothing %>
" border="0">
产品名称: <%=rs("cpname")%>
所属类别: <%=rssort("name")%>
产品说明:
<%=rs("about")%>
<% thehead %>  <%thenext %>