![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
16/11/2010, 02:50
|
![Avatar de repara2](http://static.forosdelweb.com/customavatars/avatar369161_2.gif) | | | Fecha de Ingreso: septiembre-2010 Ubicación: München
Mensajes: 2.445
Antigüedad: 14 años, 4 meses Puntos: 331 | |
Respuesta: problema consulta Hola asrael, la sentencia limit se puede utilizar así
select *** limit total_registros, registro_inicial.
De esta forma, puedes adaptar su select original:
"SELECT * FROM noticias ORDER BY fecha DESC LIMIT $cantidad"
a algo así:
"SELECT * FROM noticias ORDER BY fecha DESC LIMIT $cantidad, $registro_inicial"
$registro_inicial se tiene que acumular para que puedes pasar las páginas.
Espero que te sirva, saludos |