Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/07/2008, 11:36
Avatar de Carlojas
Carlojas
 
Fecha de Ingreso: junio-2007
Ubicación: Shikasta
Mensajes: 1.272
Antigüedad: 19 años, 3 meses
Puntos: 49
Respuesta: Dudas con pPaginador para sistema de noticias

Que tal efelix, prueba así tu código:

Código PHP:
// armamos la consulta
$sqlQueryNot = mysql_query("SELECT notTitulo, notTexto FROM sn_noticias WHERE notCategoriaID = '$cat_ID' LIMIT 0,5") or die(mysql_error());
$num_total_registros = mysql_num_rows($sqlQueryNot);
$total_paginas = ceil($num_total_registros / $TAMANO_PAGINA);
echo 
"<h1>$titulo</h1>";
// mostramos las noticias,
// otra vez usando un bucle while
while($rowNot = mysql_fetch_array($sqlQueryNot)){
echo 
"<h1>$rowNot[notTitulo]</h1>";
echo 
nl2br($rowNot['notTexto']);
echo 
"El número de noticias encontradas: " . $num_total_registros . "<br>";
echo 
"Se muestran páginas de " . $TAMANO_PAGINA . "registros cada una<br>";
echo 
"Mostrando la página " . $pagina . "de" . $total_paginas . "<p>";
} 
Saludos.