ASP问题,高手一定要进来!

来源:百度知道 编辑:UC知道 时间:2024/07/07 16:14:27
源程序效果:一行显示一个产品,自动分页
我要的效果是:一行显示5个产品 自动分页

代码:
<!--#include file=other.asp-->
<%
call c_category()
sub c_category
cid=request("pid")
ffid=request("fid")

set rs=server.CreateObject("adodb.recordset")
if cid<> ""then
sql="select * from product where categoryid="&cid&" and publicate=1 order by rank desc"
end if
if ffid<>"" then
pid=GetSameLevelId("productclass",ffid)
sql="select * from product where categoryid in ("&pid&") and publicate=1 order by rank desc"
end if
rs.open sql,conn,1,3
page="category.asp?pid="&cid&"&fid="&request("fid")&""
if rs.eof then
set kk = new kktTemplate
kk.set_file "hndKktTemp", setpath&"template\"&c_tpath&"\category_no.asp"

有用吗,cid 的作用是我猜的
<!--#include file=other.asp-->
<%
call c_category()
sub c_category
cid=request("pid")
ffid=request("fid")
pgsz=5'一页显示5条
set rs=server.CreateObject("adodb.recordset")
if cid<> ""then
sql="select * from product where publicate=1 order by rank desc"
end if
if ffid<>"" then
pid=GetSameLevelId("productclass",ffid)
sql="select * from product where publicate=1 order by rank desc"
end if
rs.open sql,conn,1,3
rs.pagesize=pgsz
rs.absolutePage= cid
page="category.asp?pid="&cid&"&fid="&request("fid")&""
do while not rs.eof
set kk = new kktTemplate
kk.set_file "hndKktTemp", setpath&"template\"&c_tpath&"\category_no.asp"
kk.set_var "$title", webtitle, false
kk.set_var &qu