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

递归出来的数据,怎么可以做分页呢
<%
CountPv   Session( "LoginID ")
Function   CountPv(GuestID)
Set   Pv   =   conn.Execute( "select   LoginID,GuestID,LoginName,PvRecord,Time   from   PvRecord   where   GuestID   =   ' "&GuestID& " ' ")
While   Not   Pv.eof
AllCount   =   AllCount+1
%>
                                <tr>
                                    <td   class= "table_style_1 "> <%=Pv( "LoginID ")%> </td>
                                    <td   class= "table_style_1 "> <%=Pv( "LoginName ")%> </td>
                                    <td   class= "table_style_1 "> <%=Pv( "GuestID ")%> </td>
                                    <td   class= "table_style_1 "> <%=Pv( "PvRecord ")%> </td>
                                    <td   class= "table_style_2 "> <%=Pv( "Time ")%> </td>
                                </tr>
<%
CountPv   Pv( "LoginID ")
Pv.MoveNext
Wend
                              End   Function
  %>

------解决方案--------------------
定义一个全局变量i
没输出一行就i = i + 1
------解决方案--------------------
dim a(100)
i=0
CountPv a(i)
Function CountPv(GuestID)
i=i+1
.
.
.
<%
CountPv Pv( "LoginID ")
Pv.MoveNext
Wend
End Function
%>
再把这些数据用分页方式写出来就差不多了