Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/12/2004, 06:34
jacven
 
Fecha de Ingreso: junio-2004
Mensajes: 106
Antigüedad: 19 años, 10 meses
Puntos: 0
ayuda para generar navegación en PHP

hola tengo el siguiente código el cual me arroja más de 10 resultados en la página pero quisiera saber cómo hago para que limite sólo a 5 y que pueda mostrar los próximos 5 registros, algo como "next" y "previous" muchas gracias.



<?
include("connection.php");
$request = "select * from TABLE order by IDA desc ";
$result = mysql_db_query("$DATAUSER",$request,$link);
$row = mysql_fetch_array($result);
if ($row) {
do {
if ($row[0]!=$id){
echo(" <table width='100%' border='0' cellspacing='0' cellpadding='0'>");
echo(" <tr> ");
if ($row[4]!="") {
echo(" <td width='100'><img src='generator/img_generator/$row[4]' width='100' height='100'></td>");
}else{
echo(" <td width='100'><img src='img/clasiperro.gif' width='100' height='100'></td>");
}
echo(" <td> ");
echo(" <table width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'>");
echo(" <tr> ");
echo(" <td valign='top' class='texto_1'>");
echo(" <table width='100%' border='0' cellspacing='6' cellpadding='6' height='84%'>");
echo(" <tr>");
echo(" <td>");
$texto = str_replace("\n", "<br>", "$row[1]");
echo(" <span class='texto_1'>$texto</span>");
echo(" </td>");
echo(" </tr>");
echo(" </table>");
echo(" </td>");
echo(" </tr>");
echo(" <tr> ");
echo(" <td height='9'> ");
echo(" <div align='right'><a href='evento.php?id=$row[0]'><img src='img/vermas.jpg' width='50' height='9' border='0'></a></div>");
echo(" </td>");
echo(" </tr>");
echo(" </table>");
echo(" </td>");
echo(" </tr>");
echo(" <tr> ");
echo(" <td colspan='2' height='1' bgcolor='#000000'></td>");
echo(" </tr>");
echo(" </table><br><br>");
}
} while ($row = mysql_fetch_array($result));
}
mysql_free_result($result);
mysql_close($link);
?>