Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Para o bem de todos segue a Paginação que funciona no MySQL, Testada e Aprovada
LEGENDAS:
TedkDados => RS
TedKBanco => Conn
TedkDados.Pagesize = 30 => Quantidade de linhas!
-------------------------
ASP
<table width="100%" border="0" cellspacing="2" cellpadding="0"><tr>
<td width="44%" height="30" bgcolor="#EBEBEB" class="classFonte01"> <strong>Nome</strong> </td>
<td width="47%" bgcolor="#EBEBEB" class="classFonte01"> <strong>E-Mail</strong> </td>
</tr>
<%
TedkBanco.CursorLocation = 3
Set TedkDados = Server.CreateObject("Adodb.RecordSet")
TedkDados.Pagesize = 30
TedkDados.Open "Select NomeNewsletterEMail, EMailNewsletterEMail From adminNewsletterEMail Order By NomeNewsletterEMail Asc",TedkBanco
If TedkDados.Eof Then
Response.Write("")
Else
PaginaAtual = CInt(Request.Querystring("Pages"))
If PaginaAtual = 0 Then
PaginaAtual = 1
End If
TedkDados.AbsolutePage = PaginaAtual
Num = TedkDados.PageCount
While Not TedkDados.Eof And TedkDados.AbsolutePage = PaginaAtual
%>
<tr>
<td height="22" bgcolor="#F7F7F7" class="classFonte01"> <% Response.Write(TedkDados("NomeNewsletterEMail")) %> </td>
<td bgcolor="#F7F7F7" class="classFonte01"> <% Response.Write(TedkDados("EMailNewsletterEMail")) %> </td>
</tr>
<%
TedkDados.MoveNext : Wend
Anterior = PaginaAtual - 1
Proximo = PaginaAtual + 1
If Anterior <= 0 Then
Anterior = 1
End If
If Proximo > TedkDados.PageCount Then
Proximo = TedkDados.PageCount
End If
%>
<tr>
<td height="30" colspan="2" align="right" bgcolor="#EBEBEB" class="classFonte01"><strong>Paginas:</strong> <%
Jo = 1
While Jo <= TedkDados.PageCount
If PaginaAtual = Jo Then
Response.Write("["&Jo&"] ")
Else
Response.Write("<a href=""Default.asp?Pages="&Jo&""" class=""classFonte01"" title=""Página "&Jo&""">"&Jo&"</a> ")
End If
Jo = Jo + 1
Wend
End If
%></td>
</tr>
</table>
Aproveitem... 100% Testado no MySQL
Carregando comentários...