Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/11/2009, 17:49
Avatar de dannce4life
dannce4life
 
Fecha de Ingreso: junio-2008
Ubicación: localhost
Mensajes: 137
Antigüedad: 16 años, 7 meses
Puntos: 6
Respuesta: Se puede hacer esto?

se puede siempre y cuando la noticia siguiente o anterior exista.

te recomiendo usar algo asi
Código php:
Ver original
  1. while($r = mysql_fetch_object($result))
  2. {
  3.     print $anterior = ((int) $r->id-1) ? '<a href="?id='.$r->id-1.'">anterior</a>' : 'anterior';
  4.     print $r->id;
  5.     print $siguiente = ((int) $r->id+1) ? '<a href="?id='.$r->id+1.'">siguiente</a>' : 'siguiente';
  6. }
__________________
Gracias