Teniendo esta tabla
CREATE TABLE IF NOT EXISTS `prueba` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(15) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=21 ;
 
INSERT INTO `count` (`id`, `nombre`) VALUES
(19, 'miguel'),
(20, 'claudia');
 
Como ven tiene tan solo dos filas.
Cuanto hago este simple select el count me devuelve 4. Aunque tenga más filas siempre devuelve 4, excepto cuanto está vacio que devuelve 1 cuando debería devolver 0,
 
$selec="select * from prueba";
$cons=mysql_query($selec);
$subcategoria1=mysql_fetch_array($cons);
 
echo count($subcategoria1);
 echo '<br/>';
 do{
	 echo $subcategoria1['nombre'];
	 echo '<br/>';
 }while($subcategoria1=mysql_fetch_array($cons));
 
Por que pasa esto? 
  
 
 

