急!!大家帮我看这段代码怎么改

来源:百度知道 编辑:UC知道 时间:2024/07/04 10:08:18
<%
i=0
sql="select * from xiaochi order by id desc"

Set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
count=rs.RecordCount
order=0
pagesize=20
if count/pagesize=int(count/pagesize) then
pagecount=count/pagesize
else
pagecount=int(count/pagesize)+1
end if
page=trim(request.QueryString("page"))
if isnumeric(page) and page<>"" then
page=CLNG(page)
if page>pagecount then
page=pagecount
end if
if page<1 then
page=1
end if
else
page=1
end if

if not rs.eof then
rs.Move (page-1)*pagesize
do while (not rs.eof) and (order<pagesize)
caixi_title=""
%>
<td><table border="0" cellpadding="0" cellspacing="1" width="100%">
<tr

你的代码太乱,无法修改给你一段代码,请参考:
<table border="0" cellpadding="0" cellspacing="1" width="100%">
<%
do while not rs.eof
IF K/3=INT(K/3) THEN%><TR><%END IF>
<td height="18" align="left">·<a href="xiaochi_display.asp?id=<%=rs("id")%>" target=_blank><%=left(rs("title"),11)%></a> </td>
<%
K=K+1
rs.movenext
loop
%>
</tr>
</table>
K是一行显示的个数,在K/3=INT(K/3)是显示3个,修改为K/6=INT(K/6)一行就显示6个。