Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/07/2008, 12:41
ric18
 
Fecha de Ingreso: marzo-2007
Mensajes: 49
Antigüedad: 18 años, 1 mes
Puntos: 0
pregunta de para paginación

Saludos

Después de batallar un poco con un script para paginar datos, obtuve resultados con este script, el problema que tengo es que al cambiar la estructura de como quiero que llame a los registros ya no me funciona la paginación.

¿Que error estoy haciendo?

Gracias


Código PHP:
<&#37;@LANGUAGE='VBScript'%>

<!--#INCLUDE File="conecta.asp" -->

 
<%

Set rs=Server.CreateObject("adodb.recordset")
    
rsnews"SELECT ID,TITULO,SUMARIO FROM NEWS"

    
rs.pagesize=1
    rs
.CursorLocation=3
    rs
.CursorType=1

rs
.Open rsnews,dbConn

 link
rs ("ID")
 
linkB "MMX_NewsD.asp?id=" &link
 titulo
rs("TITULO")
 
sumariors("SUMARIO")



Pagina Request.QueryString("pagina")
if 
pagina "1" or pagina "" then
      pagina 
"1"
end if
if 
not rs.eof then
      
      rs
.AbsolutePage pagina
end 
if
%>
<
Table width=100%>
      <
TR>
            <
TD>ID Noticia</TD>
            <
TD>Titulo</TD>
            <
TD>Resumen</TD>
      </
TR>
<%

For 
1 to 1
      
      
if not rs.eof then
            
            
'Response.write ("<TR><TD>"&rs("titulo")&"</TD><TD>"&rs("sumario")&"</TD></TR>")

'
**** <-- Si utilizo esta linea si funciona la paginaci&#243;n-->****
            
'Response.write ("<TR><TD>"&rs("ID")&"</TD><TD>"&rs("titulo")&"</TD><TD>"&rs("sumario")&"</TD></TR>")

*** <--- Si uso esta otra ya no jala -->****

            
Response.write("<table>")
            
Response.write("<td>")
            
Response.write("<tr><a href="&linkB&">"&titulo"</a></tr>" 
            
Response.Write("<tr>"&sumario"</tr>")
            
Response.Write"<tr>" &imagen"</tr>"
            
Response.Write("</td>")
            
Response.Write("</table>")

         
            
rs.MoveNext
      end 
if
next
%>
</
Table>

<
Table  Width="600" border="0" align="center">
      <
TR>
            
            <%if 
pagina "1" then%>
                  <
TD width="25%" align="center"> << </TD>
                  <
TD width="25%" align="center"> < </TD>
            <%else%>
                  <
TD width="25%" align"center"><a href="paginador.asp?pagina=0"> << </a></TD>
                  <
TD width="25%" align"center"><a href="paginador.asp?pagina=<%=pagina-1%>"> < </a></TD>
            <%
end if%>
            
            <%if 
int(pagina) => rs.PageCount then%>
                  <
TD width="25%" align="center"> > </TD>
                  <
TD width="25%" align="center"> >> </TD>
            <%else%>
                  <
TD width="25%" align"center"><a href="paginador.asp?pagina=<%=pagina+1%>"> > </a></TD>
                  <
TD width="25%" align"center"><a href="paginador.asp?pagina=<%=rs.PageCount%>"> < </a></TD>
            <%
end if%>
      </
TR>
</
Table