日期:2014-05-17  浏览次数:21264 次

循环问题..为什么不每行显示3条记录
下面显示的是
1
2
3
4
5
6
我想实现的是
1   2   3
4   5   6

不知道下面哪里错了,朋友们帮忙改一下谢谢
改正后马上结贴


<!--#include   file= "inc/conn.asp "-->      
<% '=============分页定义开始,可放在数据库打开前或后  
                                  dim   action  
        action=request.QueryString( "action ")        
        Const   MaxPerPage=6       '定义每页显示记录数,可根据实际自定义  
              dim   totalPut        
              dim   CurrentPage  
              dim   TotalPages  
              dim   sql  
                if   Not   isempty(request( "page "))   then  
                    currentPage=Cint(request( "page "))  
              else  
                    currentPage=1  
              end   if                  
'=============分页定义结束%>  
<%   '=============打开数据库数据表,要以这种方式打开        
set   rs=server.CreateObject( "adodb.recordset ")      
rs.open   "select   *   from   caipin ",conn,1,1  
%>  
<% '=============分页类代码开始,需放在数据库数据表打开后  
       
        if   err.number <> 0   then  
        response.write   " <p   align= 'center '> 数据库中暂时无数据 </p> "  
        end   if          
            if   rs.eof   And   rs.bof   then  
                      Response.Write   " <p   align= 'center '> 对不起,没有符合条件记录! </p> "  
              else  
totalPut=rs.recordcount  
                    if   currentpage <1   then  
                            currentpage=1  
                    end   if  
                    if   (currentpage-1)*MaxPerPage> totalput   then  
                  if   (totalPut   mod   MaxPerPage)=0   then  
                      currentpage=   totalPut   \   MaxPerPage  
                  else