Ver Mensaje Individual
  #6 (permalink)  
Antiguo 11/09/2007, 15:37
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 11 meses
Puntos: 2135
Re: publicacion de comentarios php + mysql

De hecho es mejor utilizar COUNT directo en SQL:
Código:
SELECT COUNT(*) FROM `tabla` WHERE `noti`=$idDeLaNoticia
Luego solo ocupas mysql_fetch_row y obtienes el primer registro que es el total de noticias, algo asi:
Código PHP:
$rst mysql_query$sql ) or die( mysql_error() );
$row mysql_fetch_row$rst );
$totalNoticias $row[0]; 
Saludos.