Tema: Ayuda bucle!
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/08/2008, 11:03
gesking
 
Fecha de Ingreso: diciembre-2006
Mensajes: 294
Antigüedad: 17 años, 4 meses
Puntos: 2
Ayuda bucle!

Hola gente, tengo un problemita... se me genera un bucle sin fin... infinito...
Yo solo quiero mostrar las ultimas 2 notas publicadas y me muestra 1 sola infinitamente....

Este es mi codigo, que hago mal?

Código PHP:
<?
$con_n 
mysql_query("SELECT * FROM radio_notas WHERE periodista = 'nestor' ORDER BY id DESC LIMIT 0, 3");
$total_registros mysql_num_rows($con_n);
?>
<ol start="1" type="1">
<?
$mostrar_n 
mysql_fetch_array($con_n);
if(
$total_registros==0){
echo
'No hay notas por el momento';
}else{
while(
$mostrar_n){
echo 
'<li><a href="completa.php?id='.$mostrar_n[id].'">'.$mostrar_n[titulo].'</a></li>';
}
}
?>
</ol>
Gracias