Ver Mensaje Individual
  #9 (permalink)  
Antiguo 31/03/2009, 09:43
Avatar de vidalsoft
vidalsoft
 
Fecha de Ingreso: julio-2008
Ubicación: /www/...
Mensajes: 339
Antigüedad: 15 años, 9 meses
Puntos: 1
Respuesta: Reporte por grupos en php mysql

Cita:
Iniciado por David el Grande Ver Mensaje
Con un bucle while, es una consulta normal
Código php:
Ver original
  1. while ($fila = mysql_fetch_row($resultado)) {
  2.     // Manejar fila
  3.     // Puedes agregar una condicional para saber si ha pasado al siguiente grupo
  4. }
pero me imprime fila por fila el grupo
Código PHP:
while($row=mysql_fetch_array($sql)){
if(
$row["grupo"]==$row["grupo"]){
        echo 
"<tr class=\"Row\">
          <td colspan=\"14\"><strong>Grupo: </strong>"
.$row["grupo"]."<strong></strong></td>
        </tr>"
;
        }

echo -.... 
filas registros
....
..

help ....
__________________
Anthony Vidal Contreras | @AnthonyVidalC | Skype: vidalsystem | [email protected]