Ver Mensaje Individual
  #3 (permalink)  
Antiguo 09/06/2011, 05:18
lisdymari
 
Fecha de Ingreso: junio-2011
Mensajes: 12
Antigüedad: 13 años, 3 meses
Puntos: 1
Respuesta: Count (*) en php

mira es q el codigo esta asi, pero no funciona
tengo un error con mysql_fetch_row()


<?php
$result = $bdd->query(
'select lv1ce,count(*) as contador
FROM userfiche
GROUP BY lv1ce)');
/* mostramos los datos */
?>

<table width="35%" border="1" height="1">
<tr>
<td><CENTER><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">Nivel</font></CENTER></td>
<td><CENTER><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">Count</font></CENTER></td>
</tr>

<?php
while ($Row ["contador"] = mysql_fetch_row ($result)) {
print ("<TR>\n");
print ("<td width=\"50%\" align=\"center\" height=\"44\"><font face=\"Verdana\">$Row[lv1ce]</font></td>");
echo "<td width=\"50%\" align=\"center\" height=\"44\">$Row[COUNT]</td>";
print ("</TR>\n");
}
print ("</TABLE></CENTER>\n");
?>